title: How can I print a certain string i times in a for loop?
body: <p>i'm trying to print out a shape that looks something like this:</p>
  <pre><code>*
  **
  ***
  ****
  *****
  </code></pre>
  <p>To do that i'm using a for loop:</p>
  <pre><code>for (int i = 1; i &lt;= 5; i++) {
    System.out.print(&quot;*&quot;);
    System.out.println;
  }
  </code></pre>
  <p>but how do I get the line 2 to print i asterisks, instead of just the one asterisk as i have so far?</p>