LearnFrenzy
Sign in Take a free test

Control Flow Statements · Control Flow MCQ · Question 10

What can a case label be? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 10 Back to Exercise

Which can be used as a classic case label?

  • A Any int variable
  • B A compile-time constant such as a literal or a static final constant Correct
  • C A method call
  • D A random value
Correct Answer: Option B

Duplicate case values are compile errors.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links