首页 > 其他 > 详细

05.循环语句

时间:2016-08-28 18:10:29      阅读:236      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!