Convert to String number with scientific format

5

I have the following number in scientific notation: 7.89894691515E12

I need to convert it to String in the common format: 7898946915150

How to do this through Java?

    
asked by anonymous 19.08.2014 / 21:38

1 answer

3
NumberFormat formatter = new DecimalFormat("###.#####");  

String f = formatter.format(d);  

You can explore the NumberFormat class for more details

    
19.08.2014 / 21:45