Monday, March 2, 2009

enum main method



enum EnumMain
{
JAN,FEB;
public static void main(String a[])
{
Month[] m=Month.values();
for(Month m1:m)
System.out.println(m1); //JAN,FEB
}
}
//Save:EnumMain.java , Run:Java EnumMain


0 comments:

Post a Comment