Java Locale getISO3Country() methodThe getISO3Country() method of Java Locale class returns a three-letter abbreviation for this locale's country. If the locale doesn't specify a county, this method will return an empty string. Otherwise, this method will return an uppercase ISO 3166 3-letter country code. SyntaxParameterNA ReturnThis method returns a three-letter abbreviation of this locale's country. ExceptionMissingResourceException: This exception will throw if the three-letter country abbreviation is not available for this locale. Example 1Test it NowOutput: Locale: english_IN Country Name: IND Example 2Test it NowOutput: Locale1 name: german_AU Locale2 name: spanish_EC Country Name of Locale1: AUS Country Name of Locale2: ECU Example 3Test it NowOutput: Locale1 name: german_AU Locale2 name: spanish_EC Locale3 name: french_BE Country Name of Locale1: AUS Country Name of Locale2: ECU Country Name of Locale3: BEL
Next TopicJava Locale
|