Just a short question here:
Why does this code
print out this
and not
?
import greenfoot.*;
public class MyWorld extends World
{
public MyWorld()
{
super(600, 400, 1);
double[] x = {0.4, 0.3, 0.2, 0.1};
double sum = 0;
for (double d : x)
{
sum += d;
System.out.println(sum);
}
}
}0.4 0.7 0.8999999999999999 0.9999999999999999
0.4 0.7 0.9 1.0

