Java的一些有用的类

来源:互联网 发布:c 编程思想 pdf 编辑:程序博客网 时间:2024/05/01 09:11

当你的程序需要读到本地存储的一些资源信息时,ResourceBundle这个类就很很有用。它默认识别properties

文件,并以

name=hello

range=0.1

这样的key-value存储和读取

Resource bundles contain locale-specific objects. When your program needs a locale-specific resource, a String for example, your program can load it from the resource bundle that is appropriate for the current user's locale. In this way, you can write program code that is largely independent of the user's locale isolating most, if not all, of the locale-specific information in resource bundles.

This allows you to write programs that can:

  • be easily localized, or translated, into different languages
  • handle multiple locales at once
  • be easily modified later to support even more locales
原创粉丝点击