Skip to main content

Would love some help :)

1 reply [Last post]
hirenmradia
Offline
Joined: 2008-09-17

Hey im a total noob at programing but I am jumping into java from scratch. I understand classes are like the blueprints of an object and they define the methods and fields. I understand that a subclass can inhertit fields from a superclass. What i dont understand is what an interface is and wha it means by "implimenting" a interface.

Could you help me decypher this jargon bellow please

"Implementing an interface allows a class to become more formal about the behavior it promises to provide. Interfaces form a contract between the class and the outside world, and this contract is enforced at build time by the compiler. If your class claims to implement an interface, all methods defined by that interface must appear in its source code before the class will successfully compile."

Thanks in advance!!

Hiren Umradia

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jhipp117
Offline
Joined: 2008-08-24

I'm new too, but my understanding is that an interface is like a "blueprint" for a whole set of related classes.