Tagged articles
2 articles
Page 1 of 1
Java Backend Technology
Java Backend Technology
Jul 29, 2022 · Backend Development

Avoid the Top 5 BigDecimal Pitfalls in Java Money Calculations

This article explains five common BigDecimal traps—including constructor precision loss, equals vs compareTo, division exceptions, string conversion quirks, and operation order—provides code examples, and recommends using the JSR‑354 Money API with Maven for safer monetary calculations in Java backend development.

BackendBigDecimalJSR 354
0 likes · 8 min read
Avoid the Top 5 BigDecimal Pitfalls in Java Money Calculations
vivo Internet Technology
vivo Internet Technology
Dec 8, 2021 · Backend Development

Overview and Usage of JavaMoney (JSR‑354) for Currency and Monetary Amount Handling

JavaMoney (JSR‑354) provides a comprehensive, extensible API for currency units, monetary amounts, conversion, rounding, and formatting, with modular packages, SPI‑based custom implementations, and dynamic data loading, enabling Java applications to handle simple to complex financial and virtual‑currency scenarios.

CurrencyExtensionJSR 354
0 likes · 27 min read
Overview and Usage of JavaMoney (JSR‑354) for Currency and Monetary Amount Handling