How do I implement multiple inheritence in Java
问题 I'm working with a certain API library in Java. It has a base class A, as well as B and C which both extend A. B & C provide similar but distinct functionality, all three classes are in the library. public abstract class A { virtual foo(); } public class B extends A {} public class C extends A {} How do I get elements of A , B , and C in my class? If I use interfaces to implement the classes, there is a lot of duplicate code, and inner classes will not allow me to override existing methods so