Q.1. I'm not able to find the static values() method and the valueOf(String s) method for enums in the java.lang.Enum<E> specification. Where is this documented?
Q.2. Also, can we run the main method inside an enum as in code below?
Murtuza Arzai wrote:Q.1. I'm not able to find the static values() method and the valueOf(String s) method for enums in the java.lang.Enum<E> specification. Where is this documented?
Ulf Dittmer wrote:
As to #2, what happened when you tried?
I tried to run this from RAD, but no corresponding class found to run.
@Christopher, I got both these methods mentioned there, but these must be associated with some Class and so why they are not found in the java 6 API spec?
Murtuza Arzai wrote:
@Christopher, I got both these methods mentioned there, but these must be associated with some Class and so why they are not found in the java 6 API spec?