Interfaces Inherited?
If a super class implements an interface does the subclass automatically implement the interface? Obviously the subclass will inherit all the methods required by the interface but would you still need to write the "implements interface" line?
[249 byte] By [
Jahvaha] at [2007-11-27 10:41:16]

> If a super class implements an interface does the
> subclass automatically implement the interface?
No. The super class already implemented the interface. The sub class use the implementation.
> Obviously the subclass will inherit all the methods
> required by the interface but would you still need to
> write the "implements interface" line?
No
Manuel Leiria
No, subclasses don't need to declare they implement an interface, which has been declared in a superclass. The subclass will automatically implement the interface, too.
-Puce
Pucea at 2007-7-28 19:11:41 >
