Home > Java > javaTutorial > body text

Process control methods in Java

巴扎黑
Release: 2016-12-05 10:45:35
Original
1098 people have browsed it

So far, I have experienced four or five programming languages, but they all feel the same. As long as you master one language, it will be much easier to learn other languages.

The flow control statements in Java are not much different from those in C language

for( ; ;){}

while(){}

do...while()

if...

if...else

if...else if....else if...else...

switch...case...default

The statement to exit the loop and the respective scope of use used in conjunction with the control statement

contiune;//Jump out of this cycle and proceed to the next step One round

break;//Jump to the end of the switch statement

return;//Jump out of the entire function, return must be written at the end of a function or in a conditional statement


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template