Java Enum FAQ - What Every Java Developer should know about Enumeration type

Java Enum was one of the best features added on JDK 1.5 Tiger release along with Generics, Autoboxing, and varargs. Enum in Java represents fixed number of well-known things e.g. number of days in Week, the number of months in the calendar year etc. Unlike C and C++ Enum in Java are much powerful and they are not an integer constant, Instead, Enum is a Type like class or interface which provides compile time type safety. In this Java Enum tutorial, we will see a couple of important points about Java Enum which help to understand Enum better and get most out of it. I have written in the style of FAQ i.e. frequently asked questions, this will help you to learn more about Java Enum's capability and features e.g. whether Enum can extend class or implement methods or not? When you can override methods inside enum? whether you can compare Enum using equals() or == in Java? etc
Read more »