Java OCA OCP Practice Question 510

Question

Fill in the blanks:

A switch statement can have ____ case statements and ____ default statements.

  • A. at most one, at least one
  • B. any number of, at most one
  • C. at least one, any number of
  • D. at least one, at most one


B.

Note

A switch statement can have any number of case statements (including none) but at most one default statement, with Option B correctly identifying this relationship.




PreviousNext

Related