Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enumerated type

 
Carlos Delgado
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4014
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic