Inheriting from multiple classes in Java (and possibly not using interface)

Posted by sheidaei on Stack Overflow See other posts from Stack Overflow or by sheidaei
Published on 2012-08-28T15:33:06Z Indexed on 2012/08/28 15:38 UTC
Read the original article Hit count: 203

So, let's say we have classes A, B and C and I want to inherit from all those classes and have another class called D, it can be done using implements and interfaces in Java. But let's say we don't want to use this simple solution, would you be able to inherit class D from classes A, B and C in any other way in Java?

(This question might be related to design patterns, it has been brought up after challenging my colleague at lunch discussing design patterns) I don't think there is any other way to have multiple inheritance in Java other than using multiple interfaces.

© Stack Overflow or respective owner

Related posts about java

Related posts about interface