Javatpoint Logo
Javatpoint Logo

Java Calendar getCalendarType() Method

The getAvailableCalendarTypes() method of java.util.Calendar class returns a Set which contains string set of all available calendar type supported by java Runtime Environment. It either returns calendar type or class name of calendar.

Syntax

Parameter

No parameter is passed to this method.

Returns

Returns the calendar type or class name of that calendar type.

Throws

Doesn't throw any exception.

Example 1

Test it Now

Output:

Type of Calendar is Gregory

Example 2

Test it Now

Output:

Type of Calendar is: gregory



Please Share

facebook twitter google plus pinterest