- Home
- Chapter 1 - Object Oriented Programming Concepts
- Object Oriented Programming Concepts
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 2 - Introduction to Java
- Introduction to Java
- Multiple Choice Questions
- Assignment Questions
- Chapter 3 - Values and Data Types
- Values and Data Types
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 4 - Operators in Java
- Operators in Java
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 5 - User-Defined Methods
- User-Defined Methods
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions
- Chapter 6 - Input in Java
- Input in Java
- Multiple Choice Questions
- Assignment Questions and Programs
- Chapter 7 - Mathematical Library Methods
- Mathematical Library Methods
- Multiple Choice Questions
- Assignment Questions
- Chapter 8 - Conditional Constructs in Java
- Conditional Constructs in Java
- Multiple Choice Questions
- Assignment Questions and Programs
- Chapter 9 - Iterative Constructs in Java
- Iterative Constructs in Java
- Multiple Choice Questions
- State whether the given statements are True or False
- Assignment Questions and Programs
- Chapter 10 - Nested for loops
- Nested for loops
- Assignment Questions and Programs
- Chapter 11 - Constructors
- Constructors
- Multiple Choice Questions
- Assignment Questions and Programs
- Chapter 12 - Library Classes
- Library Classes
- Multiple Choice Questions
- Assignment Questions
- Chapter 13 - Encapsulation and Inheritance
- Library Classes
- Multiple Choice Questions
- Assignment Questions
- Chapter 14 - Arrays
- Library Classes
- Multiple Choice Questions
- Assignment Questions
- Chapter 15 - String Handling
- Library Classes
- Multiple Choice Questions
- Assignment Questions
Nested for Loops in Java
Chapter 10
Nested for Loops in Java
Class 10 - Logix Kips ICSE Computer Applications with BlueJ
![]() Share with a Friend |
Java Program: Difference between break & labelled break, and continue & labelled continue statement
3 (i). Distinguish between the following:
break statement and labelled break statement
3 (ii). Distinguish between the following:
continue statement and labelled continue statement
3 (i). Difference between break statement and labelled break statement
|
break statement |
Labelled break statement |
|
Terminates the nearest enclosing loop or switch statement. |
Terminates a specific outer loop identified by a label. |
|
Used inside for, while, do-while, or switch. |
Used with a label attached to a loop. |
|
Control exits only one loop level. |
Control can exit multiple nested loops at once. |
|
Simple syntax: break; |
Syntax: break <labelName>; |
|
Commonly used in single loops or switch cases. |
Useful when working with nested loops. |
|
break statement is used to take the control out of the loop control structure immediately enclosing it. |
Labelled break statement transfers program control out of the code block whose label is specified as its target. |
|
For example, |
For example, |
3 (ii). Difference between continue statement and labelled continue statement
|
continue statement |
Labelled continue statement |
|
Skips the current iteration of the nearest loop. |
Skips the current iteration of a specified outer loop. |
|
Control moves to the next iteration of the same loop. |
Control jumps to the next iteration of the labelled loop. |
|
Used without labels. |
Used with labels. |
|
Syntax: continue; |
Syntax: continue <labelName>; |
|
Works within a single loop. |
Mainly used in nested loops. |
|
continue statement is used to skip the current iteration of a loop and move on to the next iteration. |
A labelled continue statement skips the current iteration of an outer loop by using a label before the loop and including the same label in continue statement. |
|
For example, |
For example, |
