aspose file tools*
The moose likes Beginning Java and the fly likes what are Enums? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what are Enums?" Watch "what are Enums?" New topic
Author

what are Enums?

Sunny Gibbony
Ranch Hand

Joined: May 14, 2008
Posts: 39
I noticed that from Java SE 1.4 to 1.5 that Sun added Enums. I am looking for a simple explanation on what Enums do and the definition of one.

Thanks
Ganesan Ramakrishnan
Ranch Hand

Joined: Mar 18, 2008
Posts: 87
Enums are constants, Like week days are constant , it wont change. you can put your project constant values into Enum classes.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36579
    
  16
You mean enumerated types with the keyword enum, not to be confused with the related class Enum and the unrelated interface Enumeration.

Try the Java Tutorials, in the first instance, and see whether that helps.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36579
    
  16
Actually, enum members are more than constants. Read the Tutorial link too, Ganzan Ramakrishnan. They are actually collected objects in their own right.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36579
    
  16
More in this thread, with different links.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what are Enums?
 
Similar Threads
Enums
What is Enums?
Newly added topics in SCJP 1.5
enums
Am I ready (v. 1001)?