Java Locale getVariant() methodThe getVaiant() method of Java Locale class is used to return the variant code for this locale. SyntaxParameterNA ReturnThis method returns the variant code. If none is defined, this method will return an empty string. Example 1Output: Locale: english_IN_IND Variant name: IND Example 2Output: Locale1: english_IN_IND Locale2: english_IN_IND Variant of locale1: IND Variant of locale2: WIN Next TopicJava-locale-hashcode-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