Skip to content
Sharp

Core Java · interview question

Which approach is recommended for handling frequent monetary operations to maintain accuracy and performance?

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

Correct answer

C. Use BigDecimal with careful rounding and scale management.

Why

Using BigDecimal with careful handling of rounding and scale provides the necessary precision for monetary operations while managing performance concerns. Double or float types may introduce rounding errors.

Test yourself on Core Java

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

Start free test
All Core Java questions →