I keep getting number format expectations, even though I\'m trimming the strings and they don\'t contain non numerical characters bizarrely it works for some numbers and not
MAX_INT is 2147483647 and you're trying to parse a bigger number as Integer.
You can use Long.parseLong instead:
Long.parseLong
System.out.println(Long.parseLong("3020857508")); // 3020857508