Moving Forward With Money-API, JSR 354: Motivation Behind the API

According to Wikipedia, money is any item or verifiable record that is generally accepted as payment for goods, services, and/or the repayment of debts in a particular country or socio-economic context. Money is represented by two parts: a numerical value and a currency. We deal with money in our programs every day, but the JDK doesn't provide a standard representation of wealth. What we need to know as developers is what data type is suitable for representing money.

The first attempt would be to use the primitive floating point types (double and float) that are available in the language. The author of Effective Java doesn't recommend using these types when precise values are required.