English

In a switch case, when the switch value does not match with any case then the execution transfers to the default case. - Computer Applications

Advertisements
Advertisements

Question

In a switch case, when the switch value does not match with any case then the execution transfers to the default case. 

Options

  • True

  • False

MCQ
True or False

Solution

This statement is True.

Explanation:

In a switch statement, control is transferred to the default case if none of the case values match the switch expression. When none of the other cases match, the default case is run. If there is no default case or match, the switch statement will simply exit. 

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.08: Conditional Statements in Java - EXERCISES [Page 99]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.08 Conditional Statements in Java
EXERCISES | Q II. 4. | Page 99
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×