DayOfWeek SATURDAY example
Description
DayOfWeek SATURDAY
defines the instance for the day-of-week of Saturday.
This has the numeric value of 6.
Syntax
SATURDAY
has the following syntax.
public static final DayOfWeek SATURDAY
Example
The following example shows how to use SATURDAY
.
import java.time.DayOfWeek;
/*from www .j a v a 2s. c om*/
public class Main {
public static void main(String[] args) {
DayOfWeek dayOfWeek = DayOfWeek.SATURDAY;
System.out.println(dayOfWeek.name());
System.out.println(dayOfWeek.getValue());
System.out.println(dayOfWeek.ordinal());
}
}
The code above generates the following result.