multiply the double Type number, from the output need to taken with two Decimal Place
double creditCardPercentage = 0.03;
String renewalEventAmount = "2144.60";
double expectedRenewalAmount = 0;
expectedRenewalAmount = Double.parseDouble(renewalEventAmount) * creditCardPercentage;
the output for the expectedRenewalAmount is 64.338
, then how can we format the above output with two decimal
Expected:
64.33