← Back to Question List
Java Code Walkthrough #15
While Loop Countdown
📄 Code
Read carefully — what does this print?1public class Main {2 public static void main(String[] args) {3 int n = 5;4 while (n >= 1) {5 System.out.print(n + " ");6 n -= 2;7 }8 }9}