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