posted 18 years ago
Actually, it will return to you a reference of some class that implements the Enumeration interface. This interface guarantees that whatever class it is, it implements the methods hasMoreElements() and next().
This is the power of programming to an interface. If someone comes up with the super data structure where everything is implemented in the best way possible, the designers of the Vector class can replace what they are using now and return the super data structure, and as long as it also implements Enumeration, it won't break your code.