enumerations in java

View Answers

June 3, 2009 at 10:59 AM

Hi Friend,

Java Enumerated types specifies what values can be assigned to a variable.This makes the Java code more readable.Enumerations are type safe means that if you define a method then the caller cannot pass in a value that does not correspond to an enumeration value. An Enumeration object generates a series of elements, one at a time which is used for passing through a collection.
It provides Compile-time type safety.For each enum type,a namespace has been provided by Type system.Therefore you don't have to prefix each constant name.Typesafe constants(Enum) aren't compiled into clients, so you can add, reorder or even remove constants without the need to recompile clients. You can add arbitrary fields and methods to an enum class.An enum type implements the arbitrary interfaces.

Thanks









Related Tutorials/Questions & Answers:
enumerations in java - Java Beginners
enumerations in java  Why enumerations is used in java ?????  Hi Friend, Java Enumerated types specifies what values can be assigned to a variable.This makes the Java code more readable.Enumerations are type safe
Advertisements
INNERCLASSS - Java Interview Questions
class b{ } } More at http://www.roseindia.net/help/java/i/inner... and can implement custom enumerations. For more information, please visit the following link: http://www.roseindia.net/java/master-java/inner.shtml
Java itrator interface
Java itrator interface  What is an Iterator interface?  An iterator over a collection. Iterator takes the place of Enumeration in the Java collections framework. Iterators differ from enumerations in two ways
Java - Java Beginners
Java   Can someone give me the examples regarding Java Enumeration?  Hi Friend, Enumerations are type safe means that if you define a method then the caller cannot pass in a value that does not correspond
Java - JDK Tutorials
Java - JDK Tutorials   This is the list of JDK tutorials which will useful for the Java programmers. Here you will learn how to use the different features of Java in your programming. JDK is required to be installed on your
Java Keywords
Enumerations extend the base class Enum.This Java keyword is used... Java Keywords       There are few keywords in Java programming language. Remember, we cannot use
Java Keywords
Java Keywords       There are few keywords in Java programming language. Remember, we cannot use... is running with assertions . If the condition is false, the Java runtime system throws
Java Keywords
Enumerations extend the base class Enum.This Java keyword is used... Java Keywords       There are few keywords in Java programming language. Remember, we cannot use
collection frame - Java Interview Questions
). (4)Enumerations: The enum keyword creates a typesafe, ordered list of values
jdk 1.5 features - Java Interview Questions
) and primitive wrapper classes (such as Integer). (4)Enumerations: The enum keyword
Java Training and Tutorials, Core Java Training
Java Training and Tutorials, Core Java Training Introduction to online Java tutorials for new java programmers.  Java is a powerful object... applications and applets with graphics and user interfaces because Java has built
Features of jsp2.1
. EL now supports Java 5.0 enumerations. Ability to plug in Property...;       The main purpose of Java Platform,  Enterprise Edition (Java EE) 5 is to ease development. Now the Jsp2.1
Best Java Tutorial for Beginners
Best Java Tutorial for Beginners to learn programming from beginning Java... streams learns Java for making their career in Java. I this section we are going to provide your tutorials for learning Java from scratch. This tutorial
Java Example Codes and Tutorials
Java Tutorials - Java Example Codes and Tutorials Java is great programming... the name to Java and modified the language to take advantage of the burgeoning World Wide Web. Java is an object-oriented language, and this is very similar
How to show all header information of message using Java Mail api
How to show all header information of message using Java Mail api       This Example shows... returns Enumerations type.  public Enumeration getAllHeaders
Argo2Ecore
and then use the EMF codegenerator to generate java code. IMHO ArgoUML is by far the best... (by jfrain2005) * add support for UML enumerations (by jfrain2005) For more
Java package
Java package       Introduction to Java Package Package is a mechanism for organizing a group... and category.  An example of package is the JDK package of SUN Java as shown
java
java  diff bt core java and java
java
java  what is java
JAVA
JAVA  how the name came for java language as "JAVA
java
java   why iterator in java if we for loop
java
java  explain technologies are used in java now days and structure java
java
java  different between java & core java
Java
Java   Whether Java is pure object oriented Language
java
java  is java open source
java
java  what is java reflection
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java  give a simple example for inheritance in java
java
java  give a simple example for inheritance in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java   What is ?static? keyword
java
java  RARP implementation using java socket
java
java  sample code for RARP using java
java
java  Does java allows multiline comments
Java
Java  how to do java in command prompt
java
java  Write a java code to print "ABABBABCABABBA
java
java  write a program in java to acess the email
java
java  send me java interview questions
java
java  how use java method
java
java  what are JAVA applications development tools
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  is java purely object oriented language
java
java  why multiple inheritance is not possible in java
java
java  explain object oriented concept in java
java
java   difference between class and interface