title: Why am I getting this error called java.lang.ArrayIndexOutOfBoundsException?
body: <p>I have written this code in Java on my 64 bit Linux system:</p>
  
  <pre><code>    class WrapperClass1
      {
         public static void main(String s [])
         {
              int noinput=s.length;
              System.out.println("Number of values entered is :- " + noinput);
              System.out.println( s[0] + "," + s[1] );
              int x = Integer.parseInt(s[0]);
              int y = Integer.parseInt(s[1]);
              int z = x + y;
              System.out.println(" Sum = " + z);
         }
      };
  </code></pre>
  
  <p>Now, when I try to compile it, it successfully compiles, but when I execute the program it shows me an exception called:</p>
  
  <pre><code>           Number of values entered is :- 0
             Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
             at WrapperClass1.main(WrapperClass1.java:7)
  </code></pre>