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?
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?
NumberFormat formatter = new DecimalFormat("###.#####");
String f = formatter.format(d);
You can explore the NumberFormat
class for more details