Guys,
I have parseDouble problem that only happened to certain figures, example as below where it supposed to return 689.9 but it return 689.9000000000001. Why ?
==========================
class testDouble
{
public static void main(
String[] args)
{
System.out.println("Hello World!");
double dTotal = 0.0;
String s1 = "325.1";
String s2 = "364.8";
dTotal = dTotal + Double.parseDouble(s1);
System.out.println("after add s1:" + dTotal);
dTotal = dTotal + Double.parseDouble(s2);
System.out.println("after add s2:" + dTotal);
}
}
==========================