Certainly, you can also incorporate one loop within another, which is referred to as a nested loop.
Within this structure, the “inner loop” is executed once for each iteration of the “outer loop.”
// Outer loop for (int i = 1; i <= 2; i++) { System.out.println("Outer: " + i); // Executes 2 times // Inner loop for (int j = 1; j <= 3; j++) { System.out.println(" Inner: " + j); // Executes 6 times (2 * 3) } }