0

Please somebody help me.I m using JAVA I am using double to store the number. After calculation i am getting output as 1.38964527E+13 but i want the output as 13896452700000 in this format.somebody please tell me how to make this change. I have already tried to converting it into integer or string.nothing works. Thank you in advance

1 Answers1

0

Try a NumberFormat:

System.out.println(new DecimalFormat("#").format(yourLongNumber));

(You should not create a new format for each output, so reuse it when possible.)

Simon Fischer
  • 1,154
  • 6
  • 22