jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes Enumerated type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Enumerated type" Watch "Enumerated type" New topic
Author

Enumerated type

Carlos Delgado
Greenhorn

Joined: Aug 17, 2004
Posts: 15
Hi!

I'm not programming Java for a few months. Now I'm getting with Java again and I'm wondering how can I create an enumerated type.

I have an array and I want that the index can be a letter, this way:



Thanks!
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3740
    
  10

When in doubt check the API, it has examples for Java 1.5:

http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html

such as:



[OCA 8 Book] [Blog]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Enumerated type
 
It's not a secret anymore!