Skip to content

Stretch: decimals are liars

Why 0.1 + 0.2 is not 0.3, and what to do about it.

W1Stretch
Question 1 of 50 right · 3 to pass
What does this print? Read it twice before you answer.

What does this print? Read it twice before you answer.

System.out.println(0.1 + 0.2);
Stretch: decimals are liars · Robot On-Ramp