Vowel or not

Report a typo

Implement a method that checks whether a given English letter is a vowel or not. The input may be in any case.

In our case, the letter 'y' is not considered a vowel.

Examples:

  1. isVowel('a') should be true
  2. isVowel('A') should be true
  3. isVowel('b') should be false
Write a program in Java 17
import java.util.Scanner;

public class Main {

public static boolean isVowel(char ch) {
// write your code here
}

/* Do not change code below */
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
char letter = scanner.nextLine().charAt(0);
System.out.println(isVowel(letter) ? "YES" : "NO");
}
}
___

Create a free account to access the full topic