In our application we deal extensively with currencies. Due to a number of
existing and upcoming requirements, which are A) require display in
part-cents as some Securities trade in increment amounts like $0.0005 (yes
1/20th of a cent) and B) Foreign exchange trading (ditto), I am considering
implementing a Currency class or interface. I know jdk 1.4 has
java.util.Currency but using 1.4 is not suitable for us right now. Also from
looking at it a little (the Javadoc) it doesn't appear suitable for
part-cents display or manipulation. Every other example or discussion I've
looked always assumes that the minor unit is indivisible (which, in the
world of high finance, is most certainly NOT the case!).

Essentially I have been thinking of a Currency class which knows its locale
and therefore can handle things like forex, part-cents and the like on a
locale and price dependant way. There are many variables; it's not something
simple like buying Coffee with your spare change or purchasing something
online with a credit card!!!

Can anyone point me to some good resources or discussion for handling
currencies in Java, for proper financial applications. It would be highly
appreciated.

thanks,
scot.

___________________________________________
Scot Mcphee -                 Snr Developer
            -       (mobile) +61-412-957414
___________________________________________
Tigerex     -        http://www.tigerex.net
            -          (bus) +61-2-82593613
___________________________________________



To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm

Reply via email to