Question 18
Back to Exercise
Which creates exactly 0.1?
- A new BigDecimal(0.1)
- B new BigDecimal("0.1") Correct
- C BigDecimal.valueOf(0.1f)
- D new BigDecimal(1 / 10)
Correct Answer: Option B
new BigDecimal(0.1) captures the binary approximation 0.1000000000000000055511…
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!