I understand how loops and nested loops work. But in the code below, I don't see why one * is printed on the first line, two on the second, etc., instead of just a column of *'s. I'm probably missing something missing very simple. Can someone explain this to me?
-------------
What is the output of the following nested for loops?
Output:for (int i = 1; i <= 5; i++) { for (int j = 1; j <= i; j++) { System.out.print("*"); } System.out.println(); }
* ** *** **** *****