Declaring enums is in chapter one of the book Sun Certified Programmer for Java 5 Study Guide, but it appears there is no more detail on this concept within the book. If this is the case, can someone recommend a good resource for further learning about enum?
I'm having trouble understanding why you would not just use an interface with constants, instead of an enumerated list. What is the benefit the enum is offering? Thanks.
The benefit is that an enum can have only one of the values specified as its constants. If you use a class with constant fields and a variable to hold the selected value, nothing prevents you from assigning to this variable a value that is not among the constants.