ENUM in JAVA
General
ENUM is another kind of CLASS, but the object for this class is limited defined by designer already; users are not allowed to create one.
It is suitable to use enum when the number of objects of a class is confirmed. Here are some examples:
Week: Monday, Tuesday, Wednesday, …, Sunday.
Month: Janurary, February, March, …, December.
Season: Spring, Summer, Fall, Winter.
…
Definition before JDK 5.0
Syntax
public class SeasonTest { public static void main(String[] args) { ...