Enum is basically a special class type, and can have methods and fields just like any other class. Any one know about the Enums Template Methods. Please give a real example for Template Methods on Enums. And can you explain about Enum Reverse Lookups.
Share
Java 5.0 Enum tricks, specially have a look on the video.
Here is a simple example of a “command” enumeration:
Here objects Doll and Soldier both have a different implementation of the function
execute().