0 votes
in JAVA by
What is enumeration in java

1 Answer

0 votes
by

Enumeration means a list of named constant. In Java, enumeration defines a class type. An Enumeration can have constructors, methods and instance variables. It is created using enum keyword. Each enumeration constant is public, static and final by default. Even though enumeration defines a class type and have constructors, you do not instantiate an enum using new. Enumeration variables are used and declared in much a same way as you do a primitive variable.

Related questions

+2 votes
asked Jul 27, 2021 in JAVA by SakshiSharma
+3 votes
asked May 13, 2021 in JAVA by rajeshsharma
...