The clear() method in Calendar class is used to return an array of all the locales available at the localized instances of the getInstance method of this class.
public static Locale getAvailableLocales()
Parameters: The method does not take any parameters.
Return Value: The method returns an array of all the locales for which the localized instances are available.
Below programs illustrate the working of getAvailableLocales() Method of Calendar class:
The first five locales are: ARE JOR SYR HRV
The first twenty availables locales are: ARE JOR SYR HRV BEL PAN MLT VEN TWN DNK PRI VNM USA MNE
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.