Monday, March 2, 2009

enum values method



enum Month
{
Jan,Feb,Mar,Apr;
}
class ValuesMEthod
{
public static void main(String arg[])
{
Month[] m=Month.values();
for(Month m1:m)
{
System.out.println(m1); // Jan,Feb,Mar,Apr
}
}
}


0 comments:

Post a Comment