title: Nested loops, how many times does it run?
body: <p><strong>How many times does this nested loop run. How do I determine it by looking at the code.</strong></p>
  
  <pre><code>int i = 5, j =0;
  while (i&gt;0)
  {
   j = 1;
   while (j&lt;i )
   {
  System.out.println(“Inner loop!”);
  j++;
   }
   System.out.println(“Outer loop!”);
   i
  </code></pre>