Java Calendar getAvailableLocales() MethodThe getAvailableLocals() method of java.util.Calendar class returns an array of all locales available in java runtime environment. The array of locales contains locales for which localized Calendar instances are available. getAvailableLocals() method is a static method. SyntaxParameterThis method doesn't accept any parameter. ReturnsThis method returns all available locales in java Runtime Environment in the form of an array. ThrowsThis method doesn't throw any exception. Example 1Output: The first 5 locales installed in runtime environment are :- ARE JOR SYR HRV BEL Example 2Output: The first 5 locales installed in runtime environment are :- ar_AE ar_JO ar_SY hr_HR fr_BE Example 3Output: ar_AE ar_JO ar_SY hr_HR fr_BE es_PA mt_MT es_VE bg zh_TW it ko uk lv da_DK es_PR vi_VN en_US //all other available locales on java runtime environment will also be printed as output Next TopicJava-calendar-getcalendartype-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India