calculate the number of vowels and consonants in a string in java
for (int k = 0; k < text.length(); k++) {
char c = text.charAt(k);
if (c == 'a' || c == 'e' || c == 'i' ||
c == 'o' || c == 'u')
owls += vowls
else
consonts += consonts
}
System.out.println("Vowel count is " + vowls);
System.out.println("Consonant count is: " + consonts);