Amazon Interview Question

Re-implement the parseInteger method in java