Вот что я бы сделал, используя Scanner
.
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String userInput;
int vowelA = 0, vowelE = 0, vowelI = 0, vowelO = 0, vowelU = 0;
System.out.println(welcomeMessage);
userInput = scan.nextLine();
userInput = userInput.toLowerCase();
for(int x = 0; x <= userInput.length() - 1; x++) {
if(userInput.charAt(x) == 97)
vowelA++;
else if(userInput.charAt(x) == 101)
vowelE++;
else if(userInput.charAt(x) == 105)
vowelI++;
else if(userInput.charAt(x) == 111)
vowelO++;
else if(userInput.charAt(x) == 117)
vowelU++;
}
System.out.println("There were " + vowelA + " A's in your sentence.");
System.out.println("There were " + vowelE + " E's in your sentence.");
System.out.println("There were " + vowelI + " I's in your sentence.");
System.out.println("There were " + vowelO + " O's in your sentence.");
System.out.println("There were " + vowelU + " U's in your sentence.");
}