kalo buat object dari class yang implements interface itu yang bener yang mana
antara dua di bawah ini (reference type-nya):
// interfacenya ContohInterface, Classnya ClassImplementsContohInterface

ClassImplemetsContohInterface obj1 = new ClassImplemetsContohInterface();

//.........

ContohInterface obj1 = new ClassImplemetsContohInterface();

// klo dicompile trus di run kok ga' ada perbedaan...



      

Kirim email ke