1.Print this pattern
000000
000000
000000
000000
Explaination:
Goal:
Goal:
We want to print 4 rows, and each row has 6 zeroes.
🔁 Outer loop (for (int i = 0; i < rows; i++))
Controls how many lines you print.
Runs 4 times (because rows = 4).
Each time it runs, it prints one full line of 6 zeroes.
🔁 Inner loop (for (int j = 0; j < columns; j++))
Controls how many zeroes are printed in one line.
Runs 6 times for each row (because columns = 6).
System.out.print("0") prints 0s without a new line.
🔁 After inner loop:
System.out.println(); moves the cursor to the next line after printing 6 zeros.