Java Calendar setFirstDayOfWeek() MethodThe 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. SyntaxParametervalue - It is to be set as the first day of the week. ReturnsNA ThrowsNA Example 1Test it NowOutput: 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 2Test it NowOutput: First Day Of week is :3 First day of week should be monday !! in uk local First day of week is Monday !! Example 3Test it NowOutput: First day is :1 After changing First Day is Sunday
Next TopicJava Calendar Class
|