aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes question on enum Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "question on enum" Watch "question on enum" New topic
Author

question on enum

Rupak Khurana
Ranch Hand

Joined: Mar 01, 2005
Posts: 89
Is there anyway to make the following code compile. The compiler complains about undefined symbol LIGHT, DARK.. If I comment Line 1 and uncomment Line 2, it will compile. But I want Line 1. Any ideas.. tricks...?

[ July 07, 2005: Message edited by: Rupak Khurana ]
[ July 07, 2005: Message edited by: Barry Gaunt ]

SCJP 1.5<br />SCWCD 1.4
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Use shades.LIGHT etc. in your Line 1


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Ariel Ortiz
Ranch Hand

Joined: May 14, 2004
Posts: 121
Hi Rupak,

The only thing that was missing was the name of the type before the enummeration value: "shades.LIGHT" instead of just "LIGHT".

...Ariel

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: question on enum