This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android this week in the Android 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: 43350
. . . and welcome to the Ranch
I agree. Here's the link:
subject: enum concept
It's not a secret anymore!