English

Explain the following jumping statement: Break

Advertisements

Question

Explain the following jumping statement:

Break

Explain
Advertisements

Solution

In Java, the break statement is a jumping statement used to terminate the execution of a loop or switch statement immediately. It transfers program control to the next statement following the loop or switch block. It is commonly used to exit a for, while, or do-while loop before its normal termination.

shaalaa.com
  Is there an error in this question or solution?
Chapter 7: Statements and their Scope - EXERCISE [Page 163]

APPEARS IN

Dheeraj Mehrotra Computer Science [English] Class 12
Chapter 7 Statements and their Scope
EXERCISE | Q 8. (b) | Page 163
Advertisements
Share
Notifications



      Forgot password?
Use app×