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 1Test it NowOutput: The first 5 locales installed in runtime environment are :- ARE JOR SYR HRV BEL Example 2Test it NowOutput: The first 5 locales installed in runtime environment are :- ar_AE ar_JO ar_SY hr_HR fr_BE Example 3Test it NowOutput: 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 Class
|