Java program to check whether the given character is a Vowel

preview_player
Показать описание

In this video session, I have practically demonstrated a Java program to check whether the given character is a Vowel.
Рекомендации по теме
Комментарии
Автор

There is one flaw if user Enters name starting with "J" for Eg Jack he might get the weird output. Although it will show it as not vowel

AnshulThakur-skrd
Автор

Please provide the link as it is not there in description

vaibhavvaidya
Автор

Thank you sir ☺️...
can you provide total notes in one link...

geethag
Автор

Another Solution for this

String s = "aeiouAEIOU";
String inputString = "saj";
if == -1) {

} else

surajgoenka
Автор

public void vowelsConsonants(){

System.out.println("enter a character here to check it is vowels or consonants");
Scanner sc = new Scanner(System.in);
char c = sc.next().charAt(0);
if(c == 'a' ||c == 'e' || c == 'i'|| c == 'o' || c == 'u'|| c == 'A'|| c == 'E'|| c == 'I' ||c == 'O'||c == 'U') {
System.out.println("given character is vowel");

}
else {
System.out.println("given character is consonants");
}
sc.close();
}

syedarshad