2.Print this pattern 

0

00

000

0000


This pattern has:


Outer loop (i): Controls the row number (from 1 to 4).

Inner loop (j): Prints i number of 0s in each row.

System.out.println() moves to the next line after each row.