alphabet n vowelin java

Solutions on MaxInterview for alphabet n vowelin java by the best coders in the world

showing results for - "alphabet n vowelin java"
Rick
22 Nov 2017
1import java.util.Scanner;
2public class VowelOrConsonant {
3   public static void main(String args[]){
4      System.out.println("Enter a character :");
5      Scanner sc = new Scanner(System.in);
6      char ch = sc.next().charAt(0);
7      if(ch == 'a'|| ch == 'e'|| ch == 'i' ||ch == 'o' ||ch == 'u'||ch == ' '){
8         System.out.println("Given character is an vowel");
9      }else{
10         System.out.println("Given character is a consonant");
11      }
12   }
13}
similar questions
queries leading to this page
alphabet n vowelin java