PPT Slide
Example Interface: Enumeration
- Enumeration is an interface, not a class.
- Implemented by class Vector and others (e.g. Hashtable).
- May be implemented by any other classes which are defined to implement it (e.g., linked list, BST, graph, etc.).
- The interface specifies that all classes which implement Enumeration must implement the two methods:
public boolean hasMoreElements( );
public Object nextElement( );