Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove E from float big number? [duplicate]

I've a float data in my code, i need to get the string out of it . the problem is , when I have big number like 10000000 ,It converts the number to something like this : 1.0E7

How can I convert it to the actual number ?

like image 368
Navid Abutorab Avatar asked Jun 23 '18 11:06

Navid Abutorab


1 Answers

follow this way to get the actual number

   float firstNumber = (float) 1.0E7;
    String firstNumberAsString = String.format("%.0f", firstNumber);
    Log.v(" OUt-Put", firstNumberAsString);

It will Give you:

android V/  OUt-Put: 10000000
like image 146
Milan Pansuriya Avatar answered Sep 23 '22 04:09

Milan Pansuriya