ibrahim yener wrote:how about using float
Still suffers from the same rounding precision issues.
As a minimum, use BigDecimal. For a more elaborate (better) solution use a custom Type to represent money. I haven't used any of them, but there appears to be a number of libraries available to do this. On the success of joda-time I would be encouraged to explore joda-money as a viable solution.