I just want the numbers to be output in "well readable" format. e.g. you can output 100000 as 100.000 which would be more readable.
Is there an already existing method that can be used for this?
You can use NumberFormat:
int n = 100000;
String formatted = NumberFormat.getInstance().format(n);
System.out.println(formatted);
Output:
100,000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With