0
How to take letters from an array of Strings Java
I have to iterate a array of Strings and take out the consonants of every word in every index. But i cannot find the right String method. Do you have any suggestions? Eg.: String [] names = {"Jess", "Amy", "Anne"} return an array { "e", "Ay", "Ae"}
10 Respostas
+ 5
Pame You can take help of this code if you want Array of vowels.
https://code.sololearn.com/cA49IqX64Px1/?ref=app
+ 2
Avinesh Thanks. That's what I wanted.
+ 1
🅰🅹 - Pʀᴏᴅᴜᴄᴛ Mᴀɴᴀɢᴇʀ tysm❣
+ 1
RAJESH PERAM hi! Don't spam in the answers please. If you have a question, you can open a new thread.
0
Consonants are non-vowels, aren't they?
0
Avinesh yes!
0
So how come you have 'A' 'e' ?
0
Avinesh by take them out i meant that i want to erase non-vowels, and leave only the vowels inside the array (English is not my first language, sorry)
0
🅰🅹 - Pʀᴏᴅᴜᴄᴛ Mᴀɴᴀɢᴇʀ To print the array, we can simply write.
System.out.print(Arrays.toString(arr1));
Nice one 👍
0
Hlo