0% found this document useful (0 votes)
9 views2 pages

Java Program for Star Pattern Output

The document contains a Java program that prints a square pattern of asterisks. It uses nested loops to print 5 rows and 5 columns of asterisks. The output of the program is five lines of five asterisks each.

Uploaded by

Prabha Tamil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Java Program for Star Pattern Output

The document contains a Java program that prints a square pattern of asterisks. It uses nested loops to print 5 rows and 5 columns of asterisks. The output of the program is five lines of five asterisks each.

Uploaded by

Prabha Tamil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

import [Link].

*;

public class pattern

public static void main(String[]args)

int n=5;

for(int i=1;i<=n;i++)

for(int j=1;j<=n;j++)

[Link]("*");

[Link]();

output

*****

*****

*****

*****

*****

You might also like