http://www.javakc.com
2022-08-06 11:55:41 查看(47) 回复(0)
public class test7 { public static void main(String[] args) { int a = 0; while (a<0){ System.out.println(a); a++; }//while是先判断后执行 System.out.println("============"); do{ System.out.println(a); a++; }while (a<0); }//do..while是先执行后判断 }//保证循环体会被至少执行一次
评论
站点统计|举报|Archiver|手机版|小黑屋|Comsenz Inc.
GMT+8, , Processed in 0.195171 second(s), 9 queries .
Powered by javakc! X1.0
© 2004-2014 javakc
f1208.com 备案号:京ICP备14030918号-1