Java guides
Every published Java guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Java guides
Most readLatest Java guides
Page 24 of 109Java BigInteger Operations: Arithmetic and Pitfalls
Learn BigInteger arithmetic, comparison, bitwise, and modular operations, plus common pitfalls like division truncation and unchecked primitive conversion.
Java Double vs BigDecimal: Precision and Performance
Compare Java's double and BigDecimal for exact decimal arithmetic, precision, and performance, and learn when each type is the right choice.
Java RoundingMode: Precision Rounding in BigDecimal
java roundingmode: Learn how to use Java's RoundingMode enum with BigDecimal and MathContext to control rounding behavior, avoid precision errors, and choose the right...
Java BigDecimal Rounding: Set Scale and Rounding Mode
java bigdecimal rounding: Learn how to round BigDecimal values in Java using setScale, RoundingMode, and MathContext with practical examples and pitfalls.
Java BigDecimal equals vs compareTo
Understand the key difference between BigDecimal equals and compareTo, including scale sensitivity, hash behavior, and practical guidance for choosing the right method.
Java BigDecimal compareTo: Usage and Scale Gotchas
Understand how Java BigDecimal.compareTo works, why it ignores scale, and how it differs from equals when sorting or using collections.
Java BigDecimal Add, Subtract, Multiply, Divide
Learn to use Java BigDecimal add, subtract, multiply, and divide for exact decimal arithmetic, including scale handling, rounding modes, and common pitfalls.
Java BigDecimal Usage: Exact Decimal Arithmetic
java bigdecimal usage: Learn how to use Java BigDecimal for exact decimal arithmetic: constructors, scale, rounding modes, comparison pitfalls, and performance tradeoffs.
Java BigDecimal: Precision, Rounding, and Performance
How to use Java BigDecimal for exact decimal arithmetic, including construction, rounding, comparison, and performance tradeoffs.
Java BigInteger: Arbitrary-Precision Arithmetic
java biginteger: Understand Java BigInteger for arbitrary-precision arithmetic: creation, operations, conversions, performance tradeoffs, and common pitfalls.