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();


Categories: How Tos, Java

Leave a Reply

%d bloggers like this: