Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java nested loop

// This nested for loop will print 5 rows of 20 asterisks each

for(int i = 0; i < 5; i++) {
  for(int j = 0; j < 20; j++) {
    System.out.print("*");
  }
  System.out.println();
}
 
PREVIOUS NEXT
Tagged: #java #nested #loop
ADD COMMENT
Topic
Name
9+2 =