hello friends, I have a doubt. Ihave read that every class extends java.lang.Object class implicitly. Does this hold for an interface also? Does a interface extend the java.lang.Object methods?
The simple rule is interfaces can extend interfaces, but not classes. classes can extend classes, but not interfaces.
Donald R. Cossitt
buckaroo
Ranch Hand
Joined: Jan 31, 2003
Posts: 401
posted
0
An interface is essentially a collection of constants and abstract methods. To make use of an interface, you implement the interface in a class - that is, you declare that the class implements the interface and you write the code for each of the methods declared in the interface as part of the class definition. Check Learning the Java Language What is an Interface? Implementing an Interface