Skip to content
Sharp

Core Java · interview question

Why is using BigDecimal preferred for financial calculations in Java?

Multiple choiceHardchapter-7-curatedpremiumcore-javacode-reading-with-modern-java
Choose one answer
Answer and explanation

Correct answer

C. It provides precise control over rounding behavior

Why

BigDecimal provides operations for arithmetic, scale manipulation, rounding, and format conversion with precise control over rounding behavior, which is crucial for financial calculations.

Test yourself on Core Java

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

Start free test
All Core Java questions →