Next: Interface 1: Implementing
Up: Java Notes
Previous: Interface
- Implementation: class that implements ALL the methods (including those in in its super-interfaces); more than one implementation possible
- If not all methods implemented the implementing class must be shown
abstract
- Interface Declaration, Instantiation and Use
- Interface and Inheritance: extending interface; super-interfaces; multiple interface inheritance allowed (``,'' delimited in declaration of implementing class)
- No inheritance relationships need exist between implementor classes in an interface hierarchy
- Interface name can be used as type of data
- Interface cannot grow: any change will make all existing implementations fail: make interface design future proof, add new interfaces incrementally
- Example:
interfaceName.constantName
Ananda Amatya
9/15/1999