getFirstDayOfWeek(): This method is available in java.util.GregorianCalendar class of Java.
Syntax:
int java.util.Calendar.getFirstDayOfWeek()
This method gets what the first day of the week.
Parameters: NA
Returns: the first day of the week.
Exceptions: NA
Approach
Java
import java.util.GregorianCalendar;public class GregorianCalendargetFirstDayOfWeek {public static void main(String[] args) {GregorianCalendar cal = new GregorianCalendar();System.out.println(cal.getFirstDayOfWeek());}}
Output:
1
No comments:
Post a Comment