MCQ Single Best Answer Not Set

QWhat is the printout of the following switch statement?
char ch = 'a';  
switch (ch){
      case 'a':
      case 'A': System.out.print(ch); break;
      case 'b':
      case 'B': System.out.print(ch); break;
      case 'c':
      case 'C': System.out.print(ch); break;
      case 'd':
      case 'D': System.out.print(ch);
}

ID: #2143 Java Control Flow 1,329 views
Question Info
#2143Q ID
Not SetDifficulty
Java Control FlowTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A abcd
  • B aa
  • C a
  • D ab
Correct Answer: Option C

Explanation

a

Share This Question

Challenge a friend or share with your study group.