Stack inherits from Vector. The problem is that this means that Stack inherits all of Vector's public methods like insertElementAt(int), removeElementAt(int) etc. meaning that anyone can destroy your stack by using these public methods. Delegation was clearly called for here, where Stack would inherit from Object and internally use a Vector.

A good example of inheritance in Java is LinkedHashMap (I just happened to read up on it so it is in my head) which extends HashMap. LinkedHashMap is an extension of a HashMap where it maintains a list of keys allowing the keys to be retrieved in the order that they were added. A LinkedHashMap is clearly a HashMap+ a little extra functionality and therefore it makes sense to reuse the existing HashMap implementation while extending it.