Locale class in java

The Locale class is instantiated to produce objects that describe a geographical or cultural region. It is one of several classes that provide you with the ability to write programs that can execute in different international environments.

For example, the formats used to display dates, times, and numbers are different in various regions.

The Locale class defines the following constants that are useful for dealing with the most common locales:


For example, the expression Locale.CANADA represents the Locale object for Canada. The constructors for Locale are

Locale(String language)

Locale(String language, String country)

Locale(String language, String country, String data)

Leave a Comment