Is there a difference between Enumeration extends ZipEntry> and Enumeration
Yes, straight from one of the sun generics tutorials:
Here Shape is an abstract class with three subclasses: Circle, Rectangle, and Triangle.
public void draw(List
shape) { for(Shape s: shape) { s.draw(this); } } It is worth noting that the draw() method can only be called on lists of Shape and cannot be called on a list of Circle, Rectangle, and Triangle for example. In order to have the method accept any kind of shape, it should be written as follows:
public void draw(List extends Shape> shape) { // rest of the code is the same }