O'Reilly logo

Oracle Certified Associate, Java SE 7 Programmer Study Guide by Richard M. Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Resource bundles and the Locale class

The Locale class is used to represent a part of the world. Associated with a locale is a set of conventions concerned with such activities as controlling the way currency or dates are displayed. The use of locales aids in the internationalization of an application. The developer specifies the locale and then uses the locale in various parts of the application.

In addition to the Locale class, we can also use resource bundles. They provide a way to customize the appearance based on the locale for data types other than numbers and dates. It is particularly useful when working with strings that change based on the locale.

For example, a GUI application will have different visual components whose text should differ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required