Trying to run something like below will throw a NumberFormatException:
int i = Integer.parseInt("99999999999999999999999999999999999");
I want this to return Integer.MAX_VALUE instead such that:
int i = foobar("99999999999999999999999999999");
assert(i == Integer.MAX_VALUE);
What is the best way to accomplish this?