What are the functions of break and continue keywords in java
Let’s first look at the break keyword. The break keyword is mainly used in loop statements or switch statements to jump out of the entire statement block.
It can also jump out of the innermost loop and continue to execute the statements below the loop.
Grammar format
break;
For example:
java video)
Output result:10 20Then let’s take a look at the continue keyword. The continue keyword is suitable for any loop control structure. Its function is to make the program jump to the next time immediately. Iteration of the loop. In a for loop, the continue statement allows the program to immediately jump to the update statement; in a while or do...while loop, the program immediately jumps to the judgment statement of the Boolean expression. Grammar format:
continue;Example:
10 20 40 50Recommended tutorial:
The above is the detailed content of What are the functions of break and continue keywords in java. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment