zwwcn

Just another WordPress.com site

Category Archives: EJB

java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result

Exception:

java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
solution: add precision and rounding model

amount.divide(b, 2, RoundingMode.HALF_UP)