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