title: I'm having trouble making a diamond shape with loops
body: <p>You have an input of <code>n</code> and that represents half the rows that the diamond will have. I was able to make the first half of the diamond but I'm EXTREMELY frustrated with the second half. I just can't seem to get it. I'm not here to ask for specific code I need, but can you point me in the right direction and give me some tips/tricks on how to write this? Also, if I'm going about this program the wrong way, feel free to tell me and tell me on how I should approach the program.  </p>
  
  <p>The diamonds at the bottom represent an <strong>input of 5</strong>. <strong>n-1</strong> represents the spaces to the left of each asterisk. Thank you for your help!</p>
  
  <pre class="lang-java prettyprint-override"><code> public static void printDiamond(int n)
    {
    for(int i=0;i&lt;n;i++)
    {
        for(int a=0;a&lt;(n-(i+1));a++)
        {
            System.out.print(" ");
        }
        System.out.print("*");
        for(int b=0; b&lt;(i*2);b++)
        {
            System.out.print("-");
        }
        System.out.print("*");
        System.out.println();
    } 
  }
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>    **    What I need              **   What I have currently
     *--*                           *--*
    *----*                         *----*
   *------*                       *------*
  *--------*                     *--------*
  *--------*
   *------*
    *----*
     *--*
      **
  </code></pre>