69

java基础知识之循环结构与数组-10962685-51CTO博客

 6 years ago
source link: http://blog.51cto.com/10972685/2069191
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
1.for循环:for(循环变量的初始化1;循环的条件2;循环变量的变化3){循环体4;}执行顺序为:1,2,4,3,2,4,3,2,4,3,2,4,3.。。。。当2为false时结束循环2.break:跳出本层循环,continue跳过本次循环,不执行下面的语句而直接进行下一次循环。3.三种循环的使用情况:1.要素1与要素3不同,首选while2.要素1与要素3相同时首选do...while3.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK