Hello, i need some help. I need to loop through an array to determine if there are vowels, consonants, a space etc. and then print for example. "character [x] located at position [x] is a consonant" or "character [x] located at position [x] is a vowel" etc. I have a small idea but cannot figure it out.
String ArrayMyName[] = {"Hector & Jorge % Farinas"}; int ArrayLenght = ArrayMyName.length; for(int counter =0; counter < ArrayLenght; counter++) { String vowel = "a,e,i,o,u"; if(ArrayMyName[counter].equals(vowel)) System.out.println("Character" + ArrayMyName[counter] + "located in position " + ArrayMyName[counter] + "is a vowel."); } }
Thank you so much in advance..