Tagged articles

Monetary

4 articles · Page 1 of 1
Java Captain
Java Captain
Feb 16, 2026 · Backend Development

Long vs BigDecimal: Choosing the Right Java Type for Money

This article compares ten community‑sourced approaches for representing monetary values in Java, explaining when a simple Long, a precise BigDecimal, a String, custom wrappers, Protobuf tricks, leadership directives, AI assistance, or even minimal integer types are appropriate, and why each choice matters.

Backend DevelopmentBigDecimalData Types
0 likes · 3 min read
Long vs BigDecimal: Choosing the Right Java Type for Money
Shepherd Advanced Notes
Shepherd Advanced Notes
Sep 6, 2024 · Fundamentals

Long vs BigDecimal for Monetary Values: Which Is Safer?

The article examines the long‑standing debate over using Long or BigDecimal to represent monetary amounts, presents ten community‑sourced approaches with visual illustrations, analyzes the underlying precision problem, and concludes with a recommendation favoring BigDecimal for accurate financial calculations.

BigDecimalData TypesFinancial Computing
0 likes · 9 min read
Long vs BigDecimal for Monetary Values: Which Is Safer?