title: Exception when printing from an Array
body: <p>I have this following code:</p>
  
  <pre><code>public void Print() {
          String formatString = "%12s %7s %9s\n";
          System.out.format(formatString, "Surname", "Initial", "Extension");
          for (int i = 0; i &lt; directory.length - 1; i++) {
              System.out.format(formatString, (Object[]) directory[i].split("\t"));
          }
  
      }
  </code></pre>
  
  <p>The point of this code is to make an array which contains something like "Smith i 0472" (the space is actually a tab). This code works perfectly when the size of the Array is the amount of things to be printed but throws an error if the array is for example, 100 and i only have 20 elements in it. I need the array to be this size. Thank you.</p>
  
  <p>Sorry if I failed to make this clear enough.</p>