public static final int parseInt(char[] array,int start,int length) throws NumberFormatException {
  if (length == 1) {
    int result=array[start] - '0';
    if (result < 0 || result > 9) {
      throw new NumberFormatException("invalid digit");
    }
    return result;
  }
 else {
    return Integer.parseInt(new String(array,start,length));
  }
}

public static final int parseInt ( char [ ] array , int start , int length ) throws NumberFormatException { if ( length == 1 ) { int result = array [ start ] - '0' ; if ( result < 0 || result > 9 ) { throw new NumberFormatException ( "invalid digit" ) ; } return result ; } else { return Integer . parseInt ( new String ( array , start , length ) ) ; } }
return the int value represented by the designated subpart of array . the calculation of the result for single - digit positive integers is optimized in time .
