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
  • 10,652
  • 6
  • 37
  • 62
Kellin Strook
  • 417
  • 4
  • 14

0 Answers0