Skip to content
Sharp

Core Java · interview question

Why is BigDecimal usually preferred over double for money calculations?

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

Correct answer

C. Because decimal correctness matters more than floating-point convenience in financial logic

Why

Binary floating-point values can produce surprising decimal results. Money logic often needs exact decimal reasoning, which is why BigDecimal is the safer default for prices, taxes, and totals.

Test yourself on Core Java

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

Start free test
All Core Java questions →