java.lang
Class ArrayIndexOutOfBoundsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IndexOutOfBoundsException
                  extended by java.lang.ArrayIndexOutOfBoundsException

public class ArrayIndexOutOfBoundsException
extends IndexOutOfBoundsException

Thrown when attempting to access a position outside the valid range of an array. For example:

 int[] i = { 1 };
 i[1] = 2;
 


Constructor Summary
ArrayIndexOutOfBoundsException()
          Create an exception without a message.
ArrayIndexOutOfBoundsException(int index)
          Create an exception indicating the illegal index.
ArrayIndexOutOfBoundsException(String s)
          Create an exception with a message.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
getCause, getLocalizedMessage, getMessage, initCause, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayIndexOutOfBoundsException

public ArrayIndexOutOfBoundsException()
Create an exception without a message.


ArrayIndexOutOfBoundsException

public ArrayIndexOutOfBoundsException(String s)
Create an exception with a message.

Parameters:
s - the message

ArrayIndexOutOfBoundsException

public ArrayIndexOutOfBoundsException(int index)
Create an exception indicating the illegal index.

Parameters:
index - the invalid index