To quote http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html :
public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY }
if you have this method:
public EnumTest(Day day) { this.day = day; }
you know that argument will always be day.
Compare with this:
const int MONDAY = 1; const int TUESDAY = 2; const int CAT = 100; const int DOG = 101;
you can pass something to this method:
public EnumTest(int day) { this.day = day; }
Using enum (or any type, such as a class or interface) gives you type safety: the type system ensures that you can only get the type you want. The second example is not type safe in this respect, because your method can take any int as an argument, and you don't know exactly what the value of int means.
Using an enumeration is a contract between the calling code and the called code that this value is of the specified type.
source share