Why avoid Java Inheritance "Extends"
- by newbie
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.