← Back to Question List
Java Code Walkthrough #4
Nested Loop Pattern
📄 Code
Read carefully — what does this print?1public class Main {2 public static void main(String[] args) {3 for (int i = 1; i <= 3; i++) {4 for (int j = 1; j <= i; j++) {5 System.out.print("* ");6 }7 System.out.println();8 }9 }10}