I have an enum that looks like this
public enum MyStates {
FIRST,
SECOND,
THIRD,
}
Every time I access them it prints it by the names I have given them. Is there a way to get their indexes? Ex. FIRST would be = 1, and so forth. Thanks
Related:
Enum with int value in Java
1, it's not an ordinal.