Loop the String to mark the vowels which are present
for ( int i = 0 ; i < str . length ( ) ; i ++ ) { if ( str . charAt ( i ) == ' A ' || str . charAt ( i ) == ' a ' ) hash [ 0 ] = 1 ; else if ( str . charAt ( i ) == ' E ' || str . charAt ( i ) == ' e ' ) hash [ 1 ] = 1 ; else if ( str . charAt ( i ) == ' I ' || str . charAt ( i ) == ' i ' ) hash [ 2 ] = 1 ; else if ( str . charAt ( i ) == ' O ' || str . charAt ( i ) == ' o ' ) hash [ 3 ] = 1 ; else if ( str . charAt ( i ) == ' U ' || str . charAt ( i ) == ' u ' ) hash [ 4 ] = 1 ; }