Interfaces can extend more than one interface . Just want to why this exception for interfaces. Following code compiles
posted 8 years ago
Are you asking why they can extend more than one? You're absolutely correct, the code compiles.
They can extend more than one because they are not exhibiting familial relationships, they are exhibiting BEHAVIOR. Just as in a ball can roll, it is Rollable, and a balloon can inflate, it is Inflateable, a tire has the same behavior as both of these so it could extend both Rollable and Inflateable. Behavior is a slightly different concept than inheritance.
[ March 08, 2007: Message edited by: Dustin Johnson ] [ March 08, 2007: Message edited by: Dustin Johnson ]