文件名称:While语句-java资源课程
文件大小:665KB
文件格式:PPT
更新时间:2024-05-16 03:16:04
java
While语句 while(condition) { // body of loop ... } public class SampleWhile { public static void main(String[] args) { int sum = 0, i = 100; while (i < 200) { i++; sum += i; } System.out.println("the sum is “ + sum); } }