나는 liftoff에 카운트 다운하지만 for 루프 대신 while 루프를 사용하는 프로그램을 작성하려고합니다.Art & Science of Java 제 4 장, 연습 문제
for 루프 코드와 동일한 기본 원칙을 사용하고 있지만 지금까지 무한 루프를 작성하는 데 성공했습니다.
import acm.program.*;
public class CountDownWhile extends ConsoleProgram {
public void run() {
int t = START;
while (t >= 0); {
println(t);
t = t--;
}
println("Liftoff!");
}
private static final int START = 10;
}