Read "Java programming ideas" concluded ------ Chapter IV (control execution flow)

The previous chapter has talked operators can now basic arithmetic operations, but in reality we have to do something in a process control, and process control have java language, it allows us to perform a method at the right time .

Difference while and do-while is that do-while statements executed at least once, even if the expression for the first time was calculated to be false; while in the first expression is false, the executable would not carried out.

The use of two return keyword: one designated a return value (void type premise of this method is not, in fact, at the end of the void type method of the present method also has the implicit return); on the other hand it will cause the current the method exits and returns that value.

 

Guess you like

Origin blog.csdn.net/keyto1/article/details/89504124