Now this bothers me. Why do I need to create an enum than creating a normal java class? what extra advantage it gives me? I really do not understand enums. Now I saw this code in stackoverflaw itself.
enum Cats { FELIX(2), SHEEBA(3), RUFUS(7); private int mAge; Cats(int age) { mAge = age; } public int getAge() { return mAge; } } And I wonder why it is an enum than a class... please explain this to me. Thanks in advance. update:
I need this for a airplane management in a airport. It was hard to figure out where to put an enum.And that's it.