How can I change 2.5E7 to 2,500,000.00?

3

1 Answer

Try:

DecimalFormat format = new DecimalFormat("#0,0000.00"); String formattedNumber = format.format(number); 

See here

If you are trying to parse 2.5E7 then you can do this

long number = Double.valueOf("2.5E7").longValue(); 
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.