Javatpoint Logo
Javatpoint Logo

Java Calendar setFirstDayOfWeek() Method

The SetFirstDayOfWeek() method of Calendar class is used to set the first day of the week. The value which is to be set as the first day of the week is passed as the parameter.

Syntax

Parameter

value - It is to be set as the first day of the week.

Returns

NA

Throws

NA

Example 1

Test it Now

Output:

first day of current week:1
Date is Wed Aug 15 17:57:56 PDT 2018 so first day of week  is 5
Date is Wed Aug 15 17:57:56 PDT 2018  then first day of week :3

Example 2

Test it Now

Output:

First Day Of week is :3
First day of week should be monday !!
 in uk local  First day of week is Monday  !!

Example 3

Test it Now

Output:

First day is :1
 After changing First Day is Sunday




Help Others, Please Share

facebook twitter pinterest