hello all, elements() of vector class returns Enumeration object,but where as this class is not implementing Enumeration interface.But i have seen the follwing statements in a ppt searched on net. "An object that implements the Enumeration interface generates a series of elements, one at a time. " How an object is providing implementation for methods in Enumeration Interface
It's using an inner class that implements Enumeration but is not available in the API.
This sort of thing happens all the time. Methods that return interfaces or abstract classes use some implementation of those interfaces or subclass of those abstract classes that can be instantiated, then return an instance of those classes.