O'Reilly logo
  • Shayne Riley thinks this is interesting:

Does the class that you contemplate extending have any flaws in its API? If so, are you comfortable propagating those flaws into your class’s API? Inheritance propagates any flaws in the superclass’s API, while composition lets you design a new API that hides these flaws.


Cover of Effective Java™