Java Calendar getFirstDayOfWeek() Method

The getFirstDayOfWeek() method of java.util.Calendar.getFirstDayOfWeek() class. It returns first day of week in integer form. i.e. corresponding integer value of DAY Field. No parameter is passed to getFirstDayOfWeek() method.

Syntax

Parameter

No parameter is passed.

Returns

Returns the first day of the week in integer form.

Throws

Does not throw an exception.

Example 1

Output:

first day of current week:1
If date is  Wed May 27 13:42:54 PDT 4015  then first day of week is  1
now first day of week :3

Example 2

Output:

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

Example 3

Output:

First day is :1
First Day of Week can be following : Monday , Tuesday , Wednesday