Home » java » Break Statement

Break Statement

Break statement can use in looping statement (for,while,do while) and also in switch case.
Break statement is used to terminate the execution of the current loop or current switch.
Break statement is also used to the execution of label.
Break statement is used in two variation

1. Break
2. Break label

1. Break

Example

Result

2. Break with label

Example

Result

Please follow and like us:
error