The enum in Java is more powerful than many other languages which can lead to surprising uses. In this article, I outline some the individual features of enum in Java, and put them together to form a state machine.

Read more at :

Java Code Geeks : Using an enum to build a State machine