Suppose that I have:
double Nc= 7.6695805E-4;
NumberFormat formatter = new DecimalFormat("0.00000000000");
String string = formatter.format(Nc);
System.out.println(string);
the output would be:
0.00076695805
But it is place in string type variable! What i have to do is to convert it into double or float or long so that it should remain same as 0.00076695805 and so that i can use it for my calculation! what i have tried is:
double Nc= 7.6695805E-4;
NumberFormat formatter = new DecimalFormat("0.00000000000");
String string = formatter.format(Nc);
System.out.println(Double.parseDouble(string));
the output becomes:
7.6695805E-4 //which is same as i gave
so what should be the solution!