Java Enum defines a set of constant variables that you can use multiple times through your application. For instance, software engineers usually define constants for week's days or payment methods. Before you start using Java Enum and learning its syntax, you may need to take a careful look at the following abstract hints about Java Enum usage:
...
Statistics : Posted by msi_333 • on Fri Mar 20, 2009 8:17 pm • Replies 1 • Views 145448
- To define Enum type you have to use enum keyword.
- All enums extend java.lang.Enum.
- You can define Enum inside a class as any class member.
- Enum can't extend (inherit ) any other type.
- Enum type constructor must be package-private.
- Enum declaration defines a class (called an enum type).
- Enum class can include methods and other variables.
- Compiler automatically adds some methods when it compile an Enum such as values() and valueOf() functions.
...
Statistics : Posted by msi_333 • on Fri Mar 20, 2009 8:17 pm • Replies 1 • Views 145448