CJCoding With Joseph
15per day
← Back to Question List

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics:
Java Quiz #8

Switch to If Else

mediumConditionals

Which if-else statement is equivalent to the given switch statement?

📄 Code

1switch (grade) {
2 case 'A':
3 System.out.println("Excellent");
4 break;
5 case 'B':
6 System.out.println("Good");
7 break;
8 default:
9 System.out.println("Average");
10}