android - How to get rid of double decimal place -


i'm trying rid of of decimal places in double,i'v done on other part's of app cant figure out here. double coming in in , i'm setting edit text

double dryfree = sender.getextras().getdouble("resultfree");   else if (getintent().hasextra("resultfree")) {         answer.settext( dryfree + ""); 

this i'v tried app crashes

 else if (getintent().hasextra("resultfree")) {         answer.settext(string.format("%.2f", dryfree + "")); 

activity number coming from, tried using string.format here getting errors, know i'm using wrong

total = (int) (a * b * c) / 0.424753; 


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -