title: java.lang.ArrayIndexOutOfBoundsException: 0 - Array larger than Index?
body: <p>Does the exception thrown indicate that the array is larger than the index? If not, what does it mean, and why? How do I correct it?</p>
  
  <hr>
  
  <p>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
      at leapyear.LeapYear.main(LeapYear.java:13)</p>
  
  <hr>
  
  <pre><code>public class LeapYear {
  
  public static void main(String[] args) { 
      int year = Integer.parseInt(args[0]);
      boolean isLeapYear;
  
      // divisible by 4
      isLeapYear = (year % 4 == 0);
  
      // divisible by 4 and not 100
      isLeapYear = isLeapYear &amp;&amp; (year % 100 != 0);
  
      // divisible by 4 and not 100 unless divisible by 400
      isLeapYear = isLeapYear || (year % 400 == 0);
  
      System.out.println(isLeapYear);
  }
  }
  </code></pre>