R
Rhino
Sorry, I didn't mean to make work for you. I assumed that was one of thoseArne Vajhøj said:That is actually a good question.
I am sure that you can find it in the JLS (Java Language
Specification).
Same in the enum JSR for Java 1.5.
You can also see it if you examine the generated byte code
or look at the source of Enum.java.
Neither should be necessary for such a basic question.
Heavy googling managed to find:
http://java.sun.com/docs/books/tutorial/reflect/special/enumSetGet.html
<quote>
Since the enum constants are singletons, the == and != operators may be
used to compare enum constants of the same type.
</quote>
But that was not obvious.
I am afraid that the answer is that most Java programmers either
use one of the first mentioned methods or know somebody that does.
questions that you experts can answer off the top of your head
Thanks for your help!