Alix Ollivier wrote:Is enum like class or interface? I've never heard of that.
An
enum is a class specifically designed for defining short lists of values that you access by name. Each value is unique in a JVM; but apart from that they are pretty much like any other class. They can have attributes (although these are usually
final, and set at construction time) and methods, and they can implement interfaces.
I suggest you read up on them
here.
BTW, there's no guarantee that an
enum is what you want; but if this data is relatively static, it's probably the way I'd go first.
Winston