मराठी

The break statement may not be used in a switch statement. - Computer Applications

Advertisements
Advertisements

प्रश्न

The break statement may not be used in a switch statement.

पर्याय

  • True

  • False

MCQ
चूक किंवा बरोबर

उत्तर

This statement is False.

Explanation:

In a switch statement, the break statement is typically used to end one case and avoid "fall-through" to the next. Without a break, the code will continue to execute the next cases even if a match is obtained, which is typically undesirable. As a result, while the break statement is optional, it is commonly used in switch statements for control flow.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.08: Conditional Statements in Java - EXERCISES [पृष्ठ ९९]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 1.08 Conditional Statements in Java
EXERCISES | Q II. 5. | पृष्ठ ९९
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×