码迷,mamicode.com
首页 > 其他好文 > 详细

05.循环语句

时间:2016-08-28 18:13:19      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:

  • for循环
  1. publicclassTestFor{
  2. publicstaticvoid main(String args[]){
  3. for(int i =0; i < 10; i++){
  4. System.out.println(i);
  5. }
  6. }
  7. }
 
  • whlie循环
  1. publicclassTestWhile{
  2. publicstaticvoid main(String args[]){
  3. int i =0;
  4. while(i <10){
  5. System.out.println(i);
  6. i++;
  7. }
  8. }
  9. }





05.循环语句

标签:

原文地址:http://www.cnblogs.com/arroneve/p/5815417.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!