1. Which of the following checks if a single character ch is one of the followin
ID: 3837597 • Letter: 1
Question
1. Which of the following checks if a single character ch is one of the following characters: a, u, o, i, e if(ch == 'a, o, u, i, e') System.out.println("character is a vowel"); if(ch == 'a' || 'o' || 'u' || 'I' || 'e') System.out.println("character is a vowel"); if(ch == 'a' || ch == 'o' || ch = 'u' || ch == 'i' || ch = 'e') System.out.println("character is a vowel"); if(ch = 'a' && ch == 'o' && ch == 'u' && ch == 'i' && ch == 'e') system.out.println("character is a vowel"); 2. The expression (2 % 20 + 7.0/2 * 10) evaluates to 37 372 37.0 Invalid expression The logical expression ('b' > = 'k') evaluates toExplanation / Answer
The answers are as follows:
1.c
This is because in this expression ch is correctly compared as per the requirement.
2.a
3.false
This is because the value of char 'b' is less than the value of 'k'.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.