Home » Java Basics » break/continue statement

break/continue statement

Break Statement

This is an example of how to use the break statement. The break statement can be used to terminate a for, while, or do-while loop. In the example the break statement is used when checking an array’s elements, as described: Create a for statement with an int index from 0 up to an int array length, that checks the elements ...

Read More »

Continue Statement

In this example we shall show you how to use the continue statement. The continue statement skips the current iteration of a for, while , or do-while loop. In the example the continue statement is used when checking an array’s elements, as described: Create a for statement with an int index from 0 up to an int array length, that ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns