使用while和do while循环完成0到9的输出
whileDoWhile.java
//使用while和do while循环完成0到9的输出
public class WhileDoWhile {
public static void main(String[] args) {
int i = 0;
while(i<10) {
System.out.print(i +",");
i++;
}
System.out.println();
int j = 0;
do {
System.out.print(j + ",");
j++;
}while(j<10);
}
}