0% found this document useful (0 votes)
48 views1 page

Java Program

This Java code uses nested for loops to print out numbers. The outer for loop iterates from 1 to 8, and the inner for loop iterates from 1 to the current value of i. Inside the inner loop, the number j is printed out on each iteration, resulting in a triangular pattern of increasing numbers being printed out on separate lines for each iteration of the outer loop.

Uploaded by

khushii90
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views1 page

Java Program

This Java code uses nested for loops to print out numbers. The outer for loop iterates from 1 to 8, and the inner for loop iterates from 1 to the current value of i. Inside the inner loop, the number j is printed out on each iteration, resulting in a triangular pattern of increasing numbers being printed out on separate lines for each iteration of the outer loop.

Uploaded by

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

import [Link].

*;
import [Link].*;
class ForLoop
{
public static void main(String args[])
{
int i,j;
for(i=1;i<=8;i++)
{
for(j=1;j<=i;j++)
[Link](j);
}
}
}

You might also like