import java.util.*;
class TestEnumeration
{
public static void main(String[] args)
{
ArrayList<Integer> al=new ArrayList<Integer>();
al.add(10);
al.add(20);
al.add(30);
al.add(40);
Enumeration e=Collections.enumeration(al);
while(e.hasMoreElements())
{
System.out.println(e.nextElement());
}
/*while(it.hasPrevious())
{
System.out.println(it.previous());
}*/
}
}
/*
boolean hasMoreElements()
element nextElement():
*/
No comments:
Post a Comment