Could you point me out to a class, from official Java API that has a good use of enums ? I could not find any specific class.
Does the Java API incorporates enums in their classes at all?
There are 328 enum classes defined in the JRE 7. I suggest you read the Enum Types tutorial
A simple one I have used is java.nio.AccessMode.
An enum worth understanding is Thread.State
A more interesting one is java.util.concurrent.TimeUnit
An example of a class which IMHO would be an enum
but predates them is ByteOrder See Joachim's comment above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With