Java tutorial
import java.time.DayOfWeek; public class Main { public static void main(String[] args) { DayOfWeek dayOfWeek = DayOfWeek.of(1); System.out.println(dayOfWeek.name()); System.out.println(dayOfWeek.getValue()); System.out.println(dayOfWeek.ordinal()); } }