text: Convert vowels into upper case character in a given string | Java program to implement the above approach ; Function to convert vowels into uppercase ; Stores the length of str ; Driver Code
code: import java . util . * ; class GFG { static void conVowUpp ( char [ ] str ) { int N = str . length ; for ( int i = 0 ; i < N ; i ++ ) { if ( str [ i ] == ' a ' str [ i ] == ' e ' str [ i ] == ' i ' str [ i ] == ' o ' str [ i ] == ' u ' ) { char c = Character . toUpperCase ( str [ i ] ) ; str [ i ] = c ; } } for ( char c : str ) System . out . print ( c ) ; } public static void main ( String [ ] args ) { String str = " eutopia " ; conVowUpp ( str . toCharArray ( ) ) ; } }