Sponsored Links


Results 1 to 2 of 2

Thread: Enumeration in java ?

  1. #1
    Senior Member saneha's Avatar
    Join Date
    Apr 2011
    Posts
    266

    Icon16 Enumeration in java ?

    Sponsored Links1


    Dear sir, please sir guide me that how enumeration is done in java??

    for example that we want to the names of months and constrain a person not to selected name or phrase other that the name of the month.

    Sponsored Links

    for this method what should we do???

  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578

    Linkedin Icon Enumeration in java

    An enum type is a type whose fields consist of a fixed set of constants. Common examples include compass directions (values of NORTH, SOUTH, EAST, and WEST) and the days of the week.

    Because they are constants, the names of an enum type's fields are in uppercase letters.

    In the Java programming language, you define an enum type by using the enum keyword. For example, you would specify a days-of-the-week enum type as:

    public enum Day {
    SUNDAY, MONDAY, TUESDAY, WEDNESDAY,
    THURSDAY, FRIDAY, SATURDAY
    }

    Note: for further details following web link can help you
    http://download.oracle.com/javase/tutorial/java/javaOO/enum.html

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Learning Enumeration 2011
    By Vuhelper in forum Java forum
    Replies: 0
    Last Post: 06-27-2011, 06:42 PM
  2. Replies: 0
    Last Post: 06-24-2011, 07:42 AM
  3. Replies: 0
    Last Post: 06-23-2011, 11:41 PM
  4. Java Applet Won't Load In Browser 2011 Java
    By Vuhelper in forum Java forum
    Replies: 0
    Last Post: 06-14-2011, 09:20 PM
  5. Replies: 1
    Last Post: 04-28-2011, 08:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft | Jobs