I am executing the following code in java but i got two different answers for what should be the same number mathematically.
public class TestClass {
public static void main(String[] args) {
double a=0.01;
double b=4.5;
double c=789;
System.out.println("Value1---->"+(a*b*c));
System.out.println("Value2---->"+(b*c*a));
}
}
Output:
Value1---->35.504999999999995
Value2---->35.505