Java Calendar getFirstDayOfWeek() MethodThe 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. SyntaxParameterNo parameter is passed. ReturnsReturns the first day of the week in integer form. ThrowsDoes not throw an exception. Example 1Output: 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 2Output: First Day Of week is :1 First day of week should be monday !! in uk local First day of week is Monday !! Example 3Output: First day is :1 First Day of Week can be following : Monday , Tuesday , Wednesday Next TopicJava-calendar-getgreatestminimum-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India