JavaTM 2 Platform
Standard Ed. 6

類別 java.util.Currency
的使用

使用 Currency 的軟體套件
java.text 提供以與自然語言無關的方式來處理文本、日期、數字和訊息的類別和介面。 
java.util 包含 collection 框架、遺留的 collection 類別、事件模型、日期和時間設施、國際化和各種實用工具類別(字元串標記產生器、隨機數產生器和位元陣列)。 
 

java.text 中 Currency 的使用
 

返回 Currency 的 java.text 中的方法
 Currency DecimalFormat.getCurrency()
          獲取格式化貨幣值時,此十進制格式使用的貨幣。
 Currency DecimalFormatSymbols.getCurrency()
          獲得這些 DecimalFormatSymbols 的貨幣。
 Currency NumberFormat.getCurrency()
          獲取格式化貨幣值時此數值格式使用的貨幣。
 

參數型別為 Currency 的 java.text 中的方法
 void DecimalFormat.setCurrency(Currency currency)
          設置格式化貨幣值時,此數字格式使用的貨幣。
 void DecimalFormatSymbols.setCurrency(Currency currency)
          設置這些 DecimalFormatSymbols 的貨幣。
 void NumberFormat.setCurrency(Currency currency)
          設置格式化貨幣值時此數值格式使用的貨幣。
 

java.util 中 Currency 的使用
 

返回 Currency 的 java.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。