Computer Science, asked by vishmish34, 7 months ago

wap in java using the switch statement to determine if an entered alphabet is a vowel or consonant.
I have a question in line no. 14 why we are writing ChechVowelOrConsonant(myChar);​

Attachments:

Answers

Answered by prem1981manoj
0

Answer:

In Java, you use double quotes (" ") for strings and single quotes (' ') for characters. Now, to check whether ch is vowel or not, we check if ch is any of: ('a', 'e', 'i', 'o', 'u') . This is done using a simple if..else statement. We can also check for vowel or consonant using a switch statement in Java.

Similar questions