java.lang
Class IndexOutOfBoundsException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IndexOutOfBoundsException
Direct Known Subclasses:
ArrayIndexOutOfBoundsException, StringIndexOutOfBoundsException

public class IndexOutOfBoundsException
extends RuntimeException

This exception can be thrown to indicate an attempt to access an index which is out of bounds on objects like String, Array, or Vector. Usually any negative integer less than or equal to -1 and positive integer greater than or equal to the size of the object is an index which would be out of bounds.


Constructor Summary
IndexOutOfBoundsException()
          Create an exception without a message.
IndexOutOfBoundsException(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

IndexOutOfBoundsException

public IndexOutOfBoundsException()
Create an exception without a message.


IndexOutOfBoundsException

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

Parameters:
s - the message