If you're using JDK 5 or later, then yes enums are probably your best option. If you're stuck with JDK 1.4 or earlier, you might want to check out
this article. Note that it was written before JDK 5 came out, and when it refers to "enum" it means "enum" as used in C/C++, not the newer
Java enum.
It's also possible to do something like this:
In general you're better off with either an enum or the typesafe enumeration from the article. But you may find older code that uses public static final ints (or other types), as above.