I thought multiple inheritance was always illegal in Java, but this code compiles:
public interface A {
void a();
}
public interface B {
void b();
}
pu
An interface can extend one or more other interfaces. You can also implement more than one interface in your classes. It is legal because interface is only contract - there is no implementation. You're simply defining a contract for what a class is able to do, without saying anything about how the class will do it.