Oracle Certified Associate Java Se 8 Programmer · Free Practice Question Easy
Question 47
Which of the following are TRUE about switch statement ?
-
A
Duplicate case labels are not allowed.
-
B
We can take default case anywhere.
-
C
case label should be within the range of switch argument type.
-
D
case label should be constant expression.
-
E
All of these.
Reveal correct answer
Correct answer: E
Explanation
case label should be constant expression. case label should be within the range of switch argument type. Duplicate case labels are not allowed. We can take default case anywhere.Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
