Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

What is Enum in Java?

Category: Java

Enum was introduced in Java 1.5 as a new type whose fields consists of fixed set of constants. For example, in Java we can create Direction as enum with fixed fields as EAST, WEST, NORTH, SOUTH.
enum is the keyword to create an enum type and similar to class. Enum constants are implicitly static and final.

Leave a Reply

Your email address will not be published. Required fields are marked *