हिंदी

What is the effect of absence of break in SWITCH statement.

Advertisements

प्रश्न

What is the effect of absence of break in SWITCH statement.

लघु उत्तरीय
Advertisements

उत्तर

In Java, the absence of a break statement in a switch statement causes fall-through. When a matching case is found, the program executes its statements and continues executing the statements of subsequent cases, regardless of whether their values match.

This process continues until a break statement or another control-flow exit is encountered, or the end of the switch block is reached.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 7: Statements and their Scope - EXERCISE [पृष्ठ १६४]

APPEARS IN

धीरज मेहरोत्रा Computer Science [English] Class 12
अध्याय 7 Statements and their Scope
EXERCISE | Q 11. (i) | पृष्ठ १६४
Advertisements
Share
Notifications



      Forgot password?
Use app×