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
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
Social Sciences,
3 months ago
Science,
3 months ago
Business Studies,
3 months ago
English,
7 months ago
Social Sciences,
7 months ago
Math,
11 months ago
Math,
11 months ago
Math,
11 months ago