title: Problem with exceptions and arrays
body: <p>Can't really understand what's going wrong here?</p>
  
  <p>It's just a simple exception with an array out of bounds.</p>
  
  <pre><code>public class Days
  {
      public static void main (String args[])
      {
          String[] dayArray = new String [4];
          {
              dayArray [0] = "monday";
              dayArray [1] = "tuesday";
              dayArray [2] = "wednesday";
              dayArray [3] = "Thursday";
              dayArray [4] = "Friday";
  
              try
              {
                  System.out.println("The day is " + dayArray[5]);
              }
              catch(ArrayIndexOutOfBoundsException Q)
              {
                  System.out.println(" invalid");
                  Q.getStackTrace();
              }
              System.out.println("End Of Program");
          }
      }
  }
  </code></pre>
  
  <p>Does anybody have any ideas as too why this won't run? I'm getting the error:</p>
  
  <pre><code>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
      at Days.main(Days.java:14)
  </code></pre>