title: Java nested for while loops
body: <p>I am having troubles with nested while loops in a for loop. I understand the nested for loop:</p>
  
  <pre><code>    for (int i = 0; i&lt;5;i++)
      {
          for (int j=i;j&lt;5;j++)    
          {
             System.out.print("*"); 
          }
          System.out.println();
      }
  </code></pre>
  
  <p>When it comes to a while loop inside a for loop I'm kinda lost, can someone explain it to me?</p>
  
  <pre><code>Expected output:
  *****
  ****
  ***
  **
  *
  </code></pre>