How to parse number string with commas to Integer or Long?

Below is the code used for parsing number string with commas to Integer or Long

String size = "277,517";
int sizeint = NumberFormat.getIntegerInstance().parse(size).intValue();

Leave a Reply

Discover more from Experiences Unlimited

Subscribe now to keep reading and get access to the full archive.

Continue reading