Calendar setFirstDayOfWeek() Method in Java with Examples
The setFirstDayOfWeek(int day_val) method in Calendar class is used to set the first day of the week using the day_val in this Calendar.
public void set(int day_val)
Parameters: The method takes one parameter day_val of integer type and refers to the first day of the week.
Return Value: The method does not return any value.
Below programs illustrate the working of setFirstDayOfWeek() Method of Calendar class:
The Current First day of the week: 1 The new first day of the week: 5
The First day of the week: 1 The new first day of the week: 2
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.