How does enum work in java?



How does enum work in java?..

Answer / Virendra Prakash

An Enum (enumeration) in Java is a special data type that represents a set of named constants. Enums can be used to create a group of related constants, and each constant within an Enum is automatically given an instance variable.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

When should I use singleton pattern?

1 Answers  


what are the oops concept in java explain with real time examples

24 Answers   Accenture, Bosch, Consummate Technologies, CTS, Current Technologies, iNautix, Infosys, Kekran Mekran, QA InfoTech, RTRT, SofTech, Tech Mahindra, Thorogood, Timios, Wipro,


Give few difference between constructor and method?

1 Answers  


What is java thread dump, how can we get java thread dump of a program?

1 Answers  


Can you have an inner class inside a method and what variables can you access?

2 Answers  


can any one send me the example program of immutable class?

2 Answers   Arfin, TCS,


What variables are stored in stack?

1 Answers  


What is a generic data type?

1 Answers  


What are the differences between this and super keyword?

1 Answers  


What is the difference between array and array list in java?

1 Answers  


How do you check if a string is lexicographically in java?

1 Answers  


What is identifier with example?

1 Answers  


Categories