1
double amount1 = 2.15;
double amount2 = 1.10;
System.out.println(amount1 - amount2);

-------

1.0499999999999998

Why above code produces 1.0499999999999998

user8355591
  • 151
  • 1
  • 8

0 Answers0