As mentioned in one of the comments on your original question, this issue has been covered on StackExchange: http://stackoverflow.com/questions/8148684/what-is-the-best-data-type-to-use-for-money-in-java-apphttps://stackoverflow.com/questions/8148684/what-is-the-best-data-type-to-use-for-money-in-java-app
Basically, floating point types should never be used to represent currencies, and like most languages Java has a more appropriate type. Oracle's own documentation on primitives suggests using BigDecimal.