Home  >  Article  >  Java  >  Process control methods in Java

Process control methods in Java

巴扎黑
巴扎黑Original
2016-12-05 10:45:351039browse

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


Statement:
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