Skip to content
Sharp

Modern Java · interview question

When implementing a complex financial calculation, why might you choose BigDecimal over double?

Multiple choiceHardchapter-7-curatedpremiummodern-javamodern-java-design-choices
Choose one answer
Answer and explanation

Correct answer

D. BigDecimal handles large scale numbers with precision

Why

BigDecimal provides precise control over decimal precision, which is crucial in financial calculations to avoid rounding errors that can occur with floating-point arithmetic.

Test yourself on Modern Java

A free test with instant, explained results. No account needed.

Start free test
All Modern Java questions →