This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Enum Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Enum" Watch "Enum" New topic
Author

Enum

Venkat Sidh
Ranch Hand

Joined: Sep 30, 2006
Posts: 61
In the below enum code,



what is the code to print string value Extra Large and invoke age().
Matt Russell
Ranch Hand

Joined: Aug 15, 2006
Posts: 165
Your code will not compile. You need to add, at a minimum, a constructor that accepts a String argument.


Matt
Inquisition: open-source mock exam simulator for SCJP and SCWCD
Venkat Sidh
Ranch Hand

Joined: Sep 30, 2006
Posts: 61
Here is the full piece of code,

Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
What have you tried so far?


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

Joined: May 02, 2006
Posts: 218
Use size.description and size.age()


SCJP 5.0 | SCWCD 1.4 <br /> <br />If you don't know where you are going, any road will take you there!
Venkat Sidh
Ranch Hand

Joined: Sep 30, 2006
Posts: 61
Barry,

I haven't tried that far but in middle I saw few questions online about Enum's, I gave a try and stuck on this particular question.

First of all I shouldn't have tried mock-up questions until I finish studying.

Thanks all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Enum