Alex Rivera | Logout

java (beginner) converting scientific notation to decimal

Asked 2012-10-25T08:27:46.477
13

if

double d =  1.999e-4

I want my output to be 0.0001999.

How can I do it?

Edit
Report

1 Answer

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

String f = formatter.format(d);  

You can explore the sub classes of NumberFormat class to know more details.

answered 2012-10-25T08:33:53.790

Your Answer