gudii9
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.nextE lement());
}
}
}
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
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.nextE
}
}
}
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Cool. ;)