This is a Java program that uses nested for loops to print a rectangle made of asterisks (*) to the console. Here's a breakdown of how the program works:
Overall, this program demonstrates how to use nested for loops to print patterns to the console. In this case, we print a rectangle made of asterisks, but other patterns could be created using different loops and print statements.
public class nested_for { public static void main(String args[]) { for(int i=1;i<=5;i++)//1<=5 2<=5 { for(int j=1;j<=5;j++) { System.out.print("*"); } System.out.println(""); } } }
* * * * * * * * * * * * * * * * * * * * * * * * *To download raw file Click Here
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions