Enums are used to declare a set of named constants, making your code more readable.
Source Code
enum Level {
LOW,
MEDIUM,
HIGH
}
public class Test {
public static void main(String[] args) {
Level myVar = Level.MEDIUM;
System.out.println(myVar);
}
}