java tutorial, Uncategorized

Java enum tutorial: 10 examples of Enum in Java

http://onlywire.com/r/49125852 “What is enum in java” simple answer enum is a keyword in java and on more detail term java enum is type like class and interface and can be used to define a set of enum constants. Enum constants are implicitly static and final and you can not change there value once created. Enum in Java provides type-safety and can be used inside switch statment like int variables. Since enum is a keyword you can not use as variable name and since its only introduced in JDK 1.5 all your previous code which has enum as variable name will not work and needs to be re-factored.

One thought on “Java enum tutorial: 10 examples of Enum in Java

Leave a comment