Skip to content
Sharp

Core Java · interview question

Why do teams use BigDecimal for financial applications in production code?

Multiple choiceEasychapter-7-curatedpremiumcore-javabigdecimal-and-money
Choose one answer
Answer and explanation

Correct answer

D. Exact arithmetic operations without floating-point errors.

Why

BigDecimal allows for exact arithmetic operations without the rounding errors that can occur with floating-point types, making it ideal for financial applications where accuracy is crucial.

Test yourself on Core Java

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

Start free test
All Core Java questions →