java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
- All Implemented Interfaces:
- Serializable
- See Also:
- Top Examples, Source Code
public ArrayIndexOutOfBoundsException()
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public ArrayIndexOutOfBoundsException(int index)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
public ArrayIndexOutOfBoundsException(String s)
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[1154]Catch ArrayIndexOutOfBoundsException
By Anonymous on 2004/11/29 19:12:41 Rate
class ArrayIndexOutOfBoundsException extends Exception { }
class SimpleException
{
public void f ( ) throws ArrayIndexOutOfBoundsException
{
System.out.println ( "Zglaszam wyjatek ArrayIndexOutOfBoundsException w metodzie f ( ) " ) ;
throw new ArrayIndexOutOfBoundsException ( ) ;
}
public static void main ( String [ ] args )
{
SimpleException bad = new SimpleException ( ) ;
try
{
bad.f ( ) ;
}
catch ( ArrayIndexOutOfBoundsException e )
{
System.err.println ( "Wyjatek przechwocony!" ) ;
}
}
}