It removes i characters starting from index 0
str = str . substring ( i ) ; return str ; } static void findPairs ( int sum , int K ) { String A , B ; A = " " ; B = " " ; String N = String . valueOf ( sum ) ; int n = N . length ( ) ;