( s [ i ] - '0' ) gives the digit value and form the number
number = ( number * 10 ) ; int x = Character . getNumericValue ( s . charAt ( i ) ) ; number = number + x ; number %= mod ; } return number ; }