Quiz · Interfaces, enums and records · lesson 6 of 8
Quiz — ordinal
What does the program print?
public class Main {
public static void main(String[] args) {
Level level = Level.HIGH;
System.out.println(level.ordinal() + " " + level);
}
}
enum Level { LOW, MEDIUM, HIGH }