Site icon Experiences Unlimited

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

Advertisements

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();
Exit mobile version