Storing the distinct vowels in the String by checking if it in the list of String and not in the list of distinct vowels
for ( int i = 0 ; i < length ; i ++ ) { if ( find ( x , str . charAt ( i ) ) && ! find ( y , str . charAt ( i ) ) ) y . add ( str . charAt ( i ) ) ; }