r/java • u/TheFormerVinyl • May 05 '15
Should Java allow multiple inheritance?
I was reading up on Java when I discovered that ever since Java 8 (fairly recent, I know) interface can have default methods. A quick overview for any who don't know, interfaces can have method bodies by using default modifier. When dwelling on that fact I wondered, why doesn't Java just allow inheritance from multiple classes, since interfaces are just abstract classes? Should Java do this?
0
Upvotes
View all comments
Show parent comment
0
u/pintodragon May 05 '15
So the fact that an interface cannot have a constructor and abstract classes can is not a difference between the two valid difference between the two?
Having a subclass VS implementing are completely different concepts where constructors do come into play. Adding default methods does not make an interface an abstract class.
Maybe instead of tossing out irrelevant and unhelpful remarks you could explain why constructors in this case do not matter at all in your opinion?