Java Locale toString() methodThe toString() method of Locale class is used to return a string representation of this Locale object, consisting of language, country, variant, script, and extensions. SyntaxParameterNA ReturnThis method returns a string representation of the Locale, for debugging. Example 1Test it NowOutput: Locale1 name: english_US_WIN String representation of Locale1: english_IN_IND Example 2Test it NowOutput: Locale1 name: english_US_WIN String representation of Locale1: english_US_WIN Locale2: fr_FRANCE_WIN String representation of Locale2: fr_FRANCE_WIN
Next TopicJava Locale
|