For n = 5

***** ***** ***** ***** *****

**Program **

public class Pattern { public void print(int n) { for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { System.out.print("*"); } System.out.println(); } } }

Given input value n, this pattern has n lines and each line contains n asterisks. We use a nested loop. The outer loop counter i is used to count the line number. Since there are n lines, the counter i counts from 1 to n. The inner loop counter j counts the number of asterisks being printed on line i. Since each line has n asterisks, the counter j runs from 1 to n.

cant u give big programs plzzzzzzzz

also plzzz xplain progs