Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

For Richard Reese: multiple inheritance

 
Martin Bechtle
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I just looked at the description and table of contents of your book. I noticed that you cover the new multiple inheritance feature. I was wondering what your thoughts are on such a new feature in Java, as multiple inheritance has always been seen as something bad as it leads to bad software architecture and difficult compiler implementation.
 
Richard Reese
author
Ranch Hand
Posts: 84
5
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin,

Thanks for the question. Multiple inheritance between interfaces has always been possible. Multiple inheritance between classes has not been, and is still not possible in Java. The introduction of default methods in Java 8 has complicated the multiple inheritance between interfaces but it is not that hard to understand.
To answer your question, I don’t have strong feelings about whether this addition to Java is good or bad. As with most language features, it can be abused, misused or made difficult to understand. If the benefit of using multiple inheritance outweighs the potential maintenance issues, then it is probably worth the effort.

Richard
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic