class FloatTest { public static void main (String args[]) { double y = 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1; System.out.println ("y is: " + y); double x = 0.999999; System.out.println("x is: " + x); if(y == x) System.out.println("x and y are equal."); else System.out.println("x and y are not equal."); } }