publicstaticvoidmain(String[]args){Scannerscan=newScanner(System.in);System.out.println("Type the word:");Stringword=scan.nextLine();String[]letters=word.split("");intcount=0;for(Stringl:letters){if(l.matches("[aeiouAEIOU]")){count+=1;}}System.out.println("The number of vowels is: "+count);}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Java: