JavaTM 2 Platform
Standard Ed. 6

类 java.util.Currency
的使用

使用 Currency 的软件包
java.text 提供以与自然语言无关的方式来处理文本、日期、数字和消息的类和接口。 
java.util 包含 collection 框架、遗留的 collection 类、事件模型、日期和时间设施、国际化和各种实用工具类(字符串标记生成器、随机数生成器和位数组)。 
 

java.textCurrency 的使用
 

返回 Currencyjava.text 中的方法
 Currency DecimalFormat.getCurrency()
          获取格式化货币值时,此十进制格式使用的货币。
 Currency DecimalFormatSymbols.getCurrency()
          获得这些 DecimalFormatSymbols 的货币。
 Currency NumberFormat.getCurrency()
          获取格式化货币值时此数值格式使用的货币。
 

参数类型为 Currencyjava.text 中的方法
 void DecimalFormat.setCurrency(Currency currency)
          设置格式化货币值时,此数字格式使用的货币。
 void DecimalFormatSymbols.setCurrency(Currency currency)
          设置这些 DecimalFormatSymbols 的货币。
 void NumberFormat.setCurrency(Currency currency)
          设置格式化货币值时此数值格式使用的货币。
 

java.utilCurrency 的使用
 

返回 Currencyjava.util 中的方法
static Currency Currency.getInstance(Locale locale)
          返回给定语言环境的国家/地区的 Currency 实例。
static Currency Currency.getInstance(String currencyCode)
          返回给定货币代码的 Currency 实例。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only