Loop to find if any palindromic String is still left in the array
for ( int i = 0 ; i < n ; i ++ ) { String s = a [ i ] ; a [ i ] = reverse ( a [ i ] ) ; if ( a [ i ] != " " ) { if ( a [ i ] . equals ( s ) ) { s1 = a [ i ] ; break ; } } } String ans = " " ;