I am reading high volume of records from a csv file. one of the column is amount and it has 2 decimal places. So I wanted to parse it to integer form but it hit error when come to this as below :
int trxnAmt = Integer.parseInt("002428859600");
Suppose it will be 2428859600 right ?
but it throws me error > java.lang.NumberFormatException: For input string: "002428859600"
I tried to use :
long a = Long.parseLong("002428859600");
it worked fine for me .
I still cannot find out what's going on. Is the number too big ?
Integer.MAX_VALUE = 0x7fffffff- your number is 90c574d0, so yes: It's too big for an Integer.