Class IndexOutOfboundException in Java

digitization, transformation, binary

Class IndexOutOfboundException in Java

IndexOutOfboundException object is thrown to indicate that an index (or some sort of ) is out of its allowed range or bounds. This applies to Array, Vector or a String. An application can subclass this class to indicate a similar kind of exception.
Two subclasses of the  IndexOutOfboundException areas:

The structure of the class IndexOutOfboundException is as follows:

public class java.lang.IndexOutOfboundException extends java.lang.RuntimeException{
//constructor
public IndexOutOfboundException();//constructs an empty IndexOutOfboundException object that is an object with no message specified.
public IndexOutOfboundException(String message); //constructs an IndexOutOfboundException object with the message specified.
}

The class IndexOutOfboundException also inherits methods from class Object and Throwable.

Ads code goes here
From Object classFrom Throwable class
clone()fillInStackTrace()
getClass()getMessage()
notify()printStackTrace()
wait()printStackTrace(PrintWriter)
wait(long, int)getLocalizedMessage()
wait(long)printStackTrace(PrintStream)
equals(Object)
toString()
finalize()
hashCode()
notifyAll()

Share and Enjoy !

READ  Class UnsupportedFlavorException in java

Leave a Comment

Your email address will not be published. Required fields are marked *