Monday 15 August 2011

how to convert 1.1760481E7 to 11760481 in java -



how to convert 1.1760481E7 to 11760481 in java -

is there function convert 1.1760481e7 double value string value. tried double.tostring(value). getting above format. need 11760481 in format.

you can utilize bigdecimal string value.

double val = 1.1760481e7; bigdecimal bigdecimal = new bigdecimal(val);// form bigdecimal string str=bigdecimal.tostring();// string value system.out.println(str);

out put:

11760481

java

No comments:

Post a Comment