GregorianCalendar.getAvailableCalendarTypes(): This method is available in java.util.GregorianCalendar class of Java.
Syntax:
Set<String> java.util.Calendar.getAvailableCalendarTypes()
This method returns an unmodifiable Set containing all calendar types supported by Calendar in the runtime environment.
Parameters: NA
Returns: an unmodifiable Set containing all available calendar types.
Exceptions: NA
Approach
Java
import java.util.GregorianCalendar;public class GregorianCalendargetAvailableCalendarTypes {public static void main(String[] args) {System.out.println(GregorianCalendar.getAvailableCalendarTypes());}}
Output:
[gregory, buddhist, japanese]
No comments:
Post a Comment