How do I add the new currency code to Java?

前端 未结 1 793
甜味超标
甜味超标 2021-01-19 02:16

The Chinese currency has the ISO 4217 code CNY. Since free global trading in that currency is restricted though, there\'s a second \'offshore\' currency equivalent, called

1条回答
  •  野的像风
    2021-01-19 03:14

    Looks like support for this was added with Java 7.

    For earlier versions, you could use an equivalent Currency class of your own devising, or less happily, replace the default java.util.Currency class (or java.util.CurrencyData, which contains the raw data) in your classpath (whitepaper).

    0 讨论(0)
提交回复
热议问题