Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

enumerations in java

Ads

 
 

Share on Google+Share on Google+

Ankit
enumerations in java
1 Answer(s)      8 years ago
Posted in : Java Beginners
Ads
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

Ads









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
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
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 - 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
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   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  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  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