Results 1 to 3 of 3
  1. #1
    muhsy is offline Member
    Join Date
    Jan 2011
    Rep Power

    Default Enumerated Types

    I recently discovered that enum type is a special class, constructors can be formed, instance variables, and the enum data declaration can posses a primitive type.

    My question is, in the general sense:

    Java Code:
    private enum Foo {
    COMMA (","),
    SEMICOLON (";");
    private String poo 
    Foo (String poo) {
    this.poo = poo;
    private String poo {return poo};
    I would like to better understand this. I know I can create a variable of Foo such as Foo morePoo and access the , and ; using the names but I just don't know how well. Strong application in parsing and compiler design.

    Thank you for the info

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

Similar Threads

  1. A default Enumerated type
    By Newbie666 in forum New To Java
    Replies: 0
    Last Post: 04-17-2010, 05:57 AM
  2. Help with sorting two types:
    By twcast in forum New To Java
    Replies: 2
    Last Post: 02-11-2010, 05:37 PM
  3. types of stacks
    By vendetta in forum New To Java
    Replies: 3
    Last Post: 02-06-2010, 04:58 AM
  4. how do I Parse Enumerated types?
    By gcampton in forum New To Java
    Replies: 5
    Last Post: 10-12-2009, 11:41 AM
  5. Problem using enumerated types
    By Stryker4526 in forum New To Java
    Replies: 3
    Last Post: 10-10-2009, 04:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts