getCalendarType(): This method is available in java.util.GregorianCalendar class of Java.
Syntax:
String java.util.GregorianCalendar.getCalendarType()
This method returns "gregory" as the calendar type.
Parameters: NA
Returns: "gregory".
Exceptions: NA
Approach
Java
import java.util.GregorianCalendar;public class GregorianCalendargetCalendarType {public static void main(String[] args) {GregorianCalendar cal = new GregorianCalendar();System.out.println(cal.getCalendarType());}}
Output:
gregory
No comments:
Post a Comment