This nested loop should only execute 14 times for each loop, correct?Code:public class Loops { public static void main(String [] args) { for (int count = 1; count<15; count++) { for( int nextCount = 1; nextCount<15; nextCount++) { System.out.println("This line will print"); } } } }
When I run the program, it ouputs "this line will print" what seems like way too many times, why is this?




Reply With Quote