Function to generate string from characters at even indices
static String makeevenString ( String str ) { String even = " " ; for ( int i = 0 ; i < str . length ( ) ; i += 2 ) { even += str . charAt ( i ) ; } return even ; }