2014/04/12

How to set thousands separator in Java?

The following will work:

int no = 124750;
String str = String.format("%,d", no);
ENJOY!

No comments:

Post a Comment