Hi If you want to know more about interface, An Interface is same as a class and it is defaultly abstract so you can't have final interfaces and if you implement an Interface you must implement all of it's methods too and for your second question you can extend an Iterface from an other Interface cheers YASITH
[ December 20, 2004: Message edited by: yasith vidanaarachchi ] [ December 20, 2004: Message edited by: yasith vidanaarachchi ]
Originally posted by marc weber: Note that interface methods cannot contain implementation because they are implicitly abstract. So, because there is no possibility of method bodies "clashing," multiple interfaces can be implemented by a single class.
Not quite true... Being abstract doesn't mean you can't contain implementation code. Abstract classes in Java can very well contain implementation code for example. Interfaces are implicitly pure abstract (a concept which Java doesn't otherwise recognise) which does mean there is no implementation code.
Note that I said interface methods are implicitly abstract. I was not referring to the interface itself (which -- as Jeroen points out -- is a more complex matter). [ December 20, 2004: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
The others seem to have covered it pretty well, so I'll just make a correction in terminology.
When you provide a body for an abstract method (either from an interface or abstract class), you are merely implementing the method. Think of implementing an interface where you must implement all of its methods or declare your class abstract.
When you provide a new body for an existing non-abstract method from a superclass, only then are you overriding the method.