Description java.util Locale class.
[java]
public final class Locale
extends Object
implements Cloneable, Serializable
[/java]
Constructors | Constructors | Description |
|---|---|
| Locale(String, String) | To build locale from language, country. |
| Locale(String, String, String) | To build locale from language, country, variant.. |
Methods | Methods | Description |
|---|---|
| clone() | To override Cloneable |
| equals(Object) | To compare two objects for the purpose of equality. |
| getCountry() | To get the country code. |
| getDefault() | To get the default locale. |
| getDisplayName() | To get the name of locale. |
| getLanguage() | To get the language code. |
| getVariant() | To get variant code. |
Description
Description
Description
Description
Description
Key Points int hashCode() method is used to override hash code.getISO3Language() method is used to return 3 letter abbreviation for the locale.getDisplayLanguage() is utilized to give back the name for the locale.