1
2
3
4
5
6
7
8
9
public class MyProg {
public enum Nums {ZERO,ONE,TWO,THREE,FOUR}
public static void main(String[] args) {
int k = Nums.ONE.ordinal() + Nums.TWO.ordinal() + Nums.THREE.ordinal() + Nums.FOUR.ordinal();
System.out.print(k);
}
}