0

My app takes user input and show results based on:

String.format("%,.2", ave)

Such as:

2345.2302 -> 2,345.23

However, large results may be pushed out of the screen. I want to convert the number into scientific notation when the results exceed 9 digits (a maximum result of 9,999,999.99 before it is converted to scientific notation).

I am not sure how to use String.format to achieve this.

hata
  • 11,633
  • 6
  • 46
  • 69
Kellin Strook
  • 487
  • 1
  • 5
  • 18

0 Answers0