Site icon Experiences Unlimited

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