SCJP Certification

Sun Certified Java Programmer Certification exam essentials

September 7th, 2009

What is the Locale class?

Java Facts, by Daisy Williams.

The Locale class is used to provide a number of convenient constants that are used to create Locale objects for commonly used locales. It is a mechanism for identifying objects, not a container for the objects themselves. The Locale class is used to represent an object that describes a geographical, cultural, or political region. This class is particularly useful for internationalization. Each region has different formats to present the date, time, and numbers. The Locale class is used to present these formats. The Locale class has the following constructors:

  • Locale(String language)
    This constructor builds a locale object to represent a language specific to a region.
  • Locale(String language, String country)
    This constructor builds a locale object to represent a language specific to a country.
  • Locale(String language, String country, String var) This constructor builds a locale object to represent a language specific to a country. The argument var provides the information about the specific vendor or the browser.
Share

Back Top

Responses to “What is the Locale class?”

Comments (0) Trackbacks (0) Leave a comment Trackback url
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*