Java Enum

In Java, an enum (short for “enumeration”) is a special data type that defines a set of named constants, also known as enum constants or enumerators. Enumerations provide a way to define a finite set of values that a variable can take on.

Enum constants are typically used to represent a predefined list of related values or options.

Related Tags

Tutorials

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.