Java Double Currency Format to 3 Places -
this question has answer here: java currency number format 16 answers i have java android app deals tips. when take in double of bill amount , tip percent, parse them to strings display later. how can format doubles make currency more readable @ end? instead of looking $1.0 $1.00. the code have mentioned is: final edittext amt = (edittext) findviewbyid(r.id.bill_amt); final edittext tip = (edittext) findviewbyid(r.id.bill_percent); final textview result = (textview) findviewbyid(r.id.res); final textview total = (textview) findviewbyid(r.id.total); double amount = double.parsedouble(amt.gettext().tostring()); double tip_per = double.parsedouble(tip.gettext().tostring()); double tip_cal = (amount * tip_per) / 100; double totalcost = amount + tip_cal; result.settext("tip amount : " + " $ " + double.tostring(tip_cal)); total.s