Inheritance menghindari duplikasi kode dengan mewariskan seluruh properti dan method berhak akses public dan protected ke kelas turunan.