File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Enumerated type" Watch "Enumerated type" New topic

Enumerated type

Carlos Delgado

Joined: Aug 17, 2004
Posts: 15

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:

Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3700

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

such as:

My Blog: Down Home Country Coding with Scott Selikoff
I agree. Here's the link:
subject: Enumerated type
Similar Threads
Class cast on Object Array
JavaScript code question
Need help with arrays and comparing integers in arrays with a number.
Constructing multidimensional arrays
Doubt about ? super