if 2 erase s [ i ] and replace next with 7
s . deleteCharAt ( i ) ; s . setCharAt ( i , '7' ) ; } else if ( s . charAt ( i ) == '3' ) s . setCharAt ( i , '2' ) ; else if ( s . charAt ( i ) <= '5' ) s . setCharAt ( i , '3' ) ; else if ( s . charAt ( i ) <= '7' ) s . setCharAt ( i , '5' ) ; else s . setCharAt ( i , '7' ) ; return ; } public static String primeDigits ( StringBuilder s ) { for ( int i = 0 ; i < s . length ( ) ; i ++ ) {