Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enumeration interface

 
Vijay pillai
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thks for the ans this was very useful.
if someone could tell me which class in the API directly implements Enumeration.
thks
VIJAY PILLAI
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From reading another of your posts, I gather that you are confused about the Enumeration interface issue. I will try and clear it up for you.
By stating that a class implements the Enumeration interface we are telling all class users that we have the following routines implemented:
boolean hasMoreElements();
Object getNextElement();
A few collections (i.e., Vector, Hashtable) have 'default' (accessible only from within java.util package) classes that implement the Enumeration interface.
Lets use the Vector class as an example:

The above code provides the means to make use of the following code:

Manfred.
[This message has been edited by Manfred Leonhardt (edited January 11, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic