<figure>![The break statement terminates the innermost while loop in case of nested loops.](img/56fee848ebc71a6592db0fd2c9007b74.png"Working of break Statement with Nested Loops")
![The break statement terminates the innermost while loop in case of nested loops.](img/56fee848ebc71a6592db0fd2c9007b74.png"Working of break Statement with Nested Loops")
Working of break Statement with Nested Loops
<figcaption>Working of break Statement with Nested Loops</figcaption>
![The labeled break statement is used to break the outermost loop.](img/171d5266b8c72bbaa191894f3cf0987f.png"Working of the labeled break statement in Java")
<figure>![The labeled break statement is used to break the outermost loop.](img/171d5266b8c72bbaa191894f3cf0987f.png"Working of the labeled break statement in Java")
Working of the labeled break statement in Java
<figcaption>Working of the labeled break statement in Java</figcaption>
<figure>![The continue statement is used in Java Loops (for, while, and do...while loops) to skip the current iteration of the loop.](img/13467eaab0527da1b3021f15025c836d.png"Working of Java continue statement")
![The continue statement is used in Java Loops (for, while, and do...while loops) to skip the current iteration of the loop.](img/13467eaab0527da1b3021f15025c836d.png"Working of Java continue statement")
Working of Java continue statement
<figcaption>Working of Java continue statement</figcaption>
</figure>
* * *
...
...
@@ -62,7 +62,7 @@ class Test {
10
```
在上面的程序中,我们使用`for`循环在每次迭代中打印`i`的值。 要了解`for`循环的工作方式,请访问 [Java for 循环](/java-programming/for-loop)。 在这里,请注意以下声明:
<figure>![The continue statement skipped the current iteration of the innermost loop in case of nested loops.](img/e85a2abed9501317a557c4b7cc9accac.png"Working of the continue Statement with Nested Loops")
![The continue statement skipped the current iteration of the innermost loop in case of nested loops.](img/e85a2abed9501317a557c4b7cc9accac.png"Working of the continue Statement with Nested Loops")
Working of the continue statement with Nested Loops
<figcaption>Working of the continue statement with Nested Loops</figcaption>
</figure>
* * *
...
...
@@ -148,11 +148,11 @@ if (number < 0.0) {
我们也可以使用`labeled continue`语句终止最外面的循环。
<figure>![The labeled continue statement is used to skip the current iteration of the outermost labeled loop.](img/ab4de94d4d765d0976fab459e36ac2ca.png"Working of the labeled continue Statement in Java")
![The labeled continue statement is used to skip the current iteration of the outermost labeled loop.](img/ab4de94d4d765d0976fab459e36ac2ca.png"Working of the labeled continue Statement in Java")
Working of the labeled continue Statement in Java
<figcaption>Working of the labeled continue Statement in Java</figcaption>
<figure>![Example showing passing argument to method and returning value](img/a4d7ea6f6937289efc4a781e08bfa8ba.png"Passing arguments and returning a value from a method in Java")
![Example showing passing argument to method and returning value](img/a4d7ea6f6937289efc4a781e08bfa8ba.png"Passing arguments and returning a value from a method in Java")
Passing arguments and returning a value from a method in Java
<figcaption>Passing arguments and returning a value from a method in Java</figcaption>
<figure>![JRE contains JVM and class libraries and JDK contains JRE, compilers, debuggers, and JavaDoc](img/e81a27912388282d5dc563dda1cdf750.png"Relationship between JVM, JRE, and JDK")
![JRE contains JVM and class libraries and JDK contains JRE, compilers, debuggers, and JavaDoc](img/e81a27912388282d5dc563dda1cdf750.png"Relationship between JVM, JRE, and JDK")
<figcaption>Relationship between JVM, JRE, and JDK</figcaption>