make double 2 decimal places java to string code example
Example: java double to string with 2 decimals
double d = 5.921763;
DecimalFormat df = new DecimalFormat("#.00");
String string = df.format(d);
// string = "5.92"
double d = 5.921763;
DecimalFormat df = new DecimalFormat("#.00");
String string = df.format(d);
// string = "5.92"