• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic