Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

collection enumeration

hi,

I was running following example

import java.util.Enumeration;
import java.util.Hashtable;

public class sssssss {
   public static void main(String[] args) {
      Hashtable ht = new Hashtable();
      ht.put("1", "One");
      ht.put("2", "Two");
      ht.put("3", "Three");
      Enumeration e = ht.elements();
      While(e.hasMoreElements())
      {
         System.out.println(e.nextElement());
      }
   }
}


from link

http://www.tutorialspoint.com/javaexamples/collection_enumeration.htm

Iam getting compilation error at line

 While(e.hasMoreElements())

to insert ;

Why above error coming how to fix it

Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of krakatoa
krakatoa
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Cool. ;)