Why avoid Java Inheritance "Extends"

Posted by newbie on Programmers See other posts from Programmers or by newbie
Published on 2011-05-10T14:00:26Z Indexed on 2012/09/16 15:51 UTC
Read the original article Hit count: 223

Good day!

Jame Gosling said “You should avoid implementation inheritance whenever possible.” and instead, use interface inheritance.

But why? How can we avoid inheriting the structure of an object using the keyword "extends", and at the same time make our code Object Oriented?

Could someone please give an Object Oriented example illustrating this concept in a scenario like "ordering a book in a bookstore?"

Thank you in advance.

© Programmers or respective owner

Related posts about java

Related posts about design