Chapter 4 Control Execution Process

4.1 true and false

4.2 if -else

4.3 Iteration

while 、do-while 、for

The difference between while and do-while is that do-while must execute once for, which is often used to perform counting tasks

4.4 Forsearch syntax

for(float x : f){}

4.5 return

return has two uses, one indicates what value a method returns, and on the other hand it will cause the current method to exit.

4.6 break 和 continue

break means to execute the exit loop without executing the remaining statements in the loop. And continue stops executing the current iteration and starts the next iteration.

4.7 goto reserved word

4.8 switch

select statement

switch(){ case : break;

default:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325951191&siteId=291194637