InterviewSolution
Saved Bookmarks
| 1. |
Write a java program to check whether the given character is vowel or not |
|
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. |
|