Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Beginning Java and the fly likes enum concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "enum concept" Watch "enum concept" New topic

enum concept

krishna ranjan

Joined: Nov 22, 2011
Posts: 8
can anyone explain me the concept of enum .. i am not able to get this topic .. please explain it with example also..
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Maybe this will help you.

It works like a typed array. Better than array of String because if you pass the wrong type of Enum in a argument you will receive a compile time error.

[] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
Jeff Verdegan

Joined: Jan 03, 2004
Posts: 6109

krishna ranjan wrote:can anyone explain me the concept of enum .. i am not able to get this topic

You'll get better responses if you give some indication of what you've read and tried so far and what in particular you don't understand.

.. please explain it with example also..

There are plenty of examples available on the web. Please SearchFirst.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 36478
. . . and welcome to the Ranch
I agree. Here's the link:
subject: enum concept
Similar Threads
Enum doubt
hi everybody, good morning
Doubt About Enum in java 1,5
about enum
retrieve enumeration datatype into jsp