Computer Applications
Which clause is optional in the switch statement?
- default
- case
- switch
- None of these
Java Conditional Stmts
15 Likes
Answer
default
Answered By
4 Likes
Related Questions
Consider the following code snippet:
int val = 2; switch (val) { case 1: System.out.println("Case 1"); break; case 2: System.out.println("Case 2"); break; default: System.out.println("No match found"); break; }
Which of the following statements is correct?
A sequence of statements enclosed between a pair of curly brackets is called
Which of the following statements involves a fall-through?
Which of the following causes a fall-through in the switch statement?