Enums in java
In prior releases, the standard way to represent an enumerated type was the int Enum pattern:
**// int Enum Pattern - has severe problems!** public static final int SEASON\_WINTER = 0; public static final int SEASON\_SPRING = 1; public static final int SEASON\_SUMMER = 2; public static final int SEASON\_FALL = 3; But these are not type safe, and clearly naming them is bit of a problem. So in Java 5, they introduced Enums.
[Read More]