title: Simple formatting question in Java using printf
body: <p>I have an array of 12 numbers </p>
  
  <pre><code>int ary2[] = {3,5,9,11,15,18,22,23,30,31,35,39};
  </code></pre>
  
  <p>I want to print the numbers out with 2 places for the number and a space between the numbers. </p>
  
  <p>Example print out would be :</p>
  
  <pre><code> 3  5  9 11 15 18 22 23 30 31 35 39
  </code></pre>
  
  <p>This is how far I got. </p>
  
  <pre><code>for(int i = 0; i &lt; ary2.length; i++)
  {
      System.out.printf("%-3s", ary2[i]);
  }
  </code></pre>
  
  <p>I'm new at this. 
  Although I won't be directly submitting this as homework, it is affiliated with a homework project of mine; therefore, i'll be using that homework tag anyways.</p>
  
  <p>EDIT: Answer Found.</p>