• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Enum or enum?

 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all...

Please help this knothead out. I thought I had this enum thing figured out.

What is an Enum, and, what is an enum? How do they relate?
thanks
g
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Enum is the common base class of all Java language enumeration types." - API
Enum constructor cannot be called by programmer.

When you declare "enum" type in your code byte code uses "Enum".

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Enum.html

Hope this helps!
[ April 19, 2007: Message edited by: Sri Kan ]
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a link that may help you clear things up:

http://jakarta.apache.org/commons/lang/api-release/org/apache/commons/lang/enum/Enum.html

"Deprecated. Replaced by org.apache.commons.lang.enums.Enum and will be removed in version 3.0. All classes in this package are deprecated and repackaged to org.apache.commons.lang.enums since enum is a Java 1.5 keyword."

Hope this helps.

Cheers,

Cory
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm pretty sure that org.apache.commons class has nothing to do with anything that would be on the SCJP. Please refer to Sri Kan's link for more relevant info.
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic