http://www.javakc.com
2022-08-06 11:55:40 查看(2) 回复(0)
package java0806; public class text_while { public static void main(String[] args) { int a=10; while (a<10){//先判断后输出 a++; } System.out.println(a); int i=10; do {//do while循环会先执行后判断 i++;//就算不符合也会执行一次 }while (i<10);//判断i是否符合 System.out.println(i); } }
评论
站点统计|举报|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