java learning day6

Loop
structure A certain piece of code can be repeatedly executed under the condition that the loop condition is satisfied
In order to solve the repeated code
for, while, do while in the program;
a, for loop
Format :
for(initialization statement; judgment statement; control conditional statement){
   loop body
}

First execute the initialization statement, execute the judgment conditional statement, and continue to execute if the result is true,

Execute the loop body statement, then execute the control conditional statement, and then execute the judgment statement, and so on and so forth,

End the loop when the result of the judgment statement is false

Guess you like

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