/** * Name: John Doe * Course: CSCI 241 - Computer Science I * Section: 001 or 002 * Assignment: 1 * * Project/Class Description * * Known Bugs: */ import java.util.*; public class CompareDoubleValue { public static void main(String [] args) { double x = 0.3; System.out.println("At beginning, x = " + x); if (x == 0.3) System.out.println("x = 0.3"); x = x - 0.1 - 0.1 - 0.1; System.out.println("x = " + x); if (x == 0.0) System.out.println("x now = 0"); else System.out.println("x does not = 0"); } }