code: interface Component{} class Container implements Component{ private Component[] children; } Is this demonstrate an "is a" relationship? I thought "is a" only exit between superclass and subclass. I mean in the case using extends. But the answer is yes for the above code. Can someone give me some idea about it?
Both classes and interfaces can be involved in an "is a " relationship. In java you can use the instanceof operator to test if an object is an instance of a particular class or interface.
Rob [ January 18, 2002: Message edited by: Rob Ross ]