I want to convert an Integer 35634646 to have the thousand “,” so it should be 35,634,646.
What would be the quickest way to doing that?
Advertisement
Answer
System.out.println(NumberFormat.getNumberInstance(Locale.US).format(35634646));
Output: 35,634,646