(May 3, 2013 02:41 PM)Gpure Wrote: I tried those methods but it throwed a syntax error when I compared type double to Double.
It's only for my Intro to Computer Science class where the skill level is at a point of 3rd grade, and since I finished all the assignments, he told me to learn to write to a File.
I don't have the java developer kit on this computer, so, I can't really post working code, but, try something along these lines:-
Code
Double firstDouble = 45.6
Double secondDouble = Double.parseDouble("45.6");
firstDouble.compareTo(secondDouble) == (Double)0? System.out.println("We match!"); : System.out.println("We don't match");And post the results, although, I'm sure that's not the most efficient way to test it, it's just the only way I can provide without downloading loads of shit.
