package exceptions;
public class OutOfBoundEx {
public static void main(String[] args) {
int arr[]=new int[5];
try
{
System.out.println(arr[8]);
}catch(ArrayIndexOutOfBoundsException ae)
{
System.out.println("Exception Thrown "+ae);
}
System.out.println("Instruction executed After Exception is thrown i.e. out of try catch block");
}
}
public class OutOfBoundEx {
public static void main(String[] args) {
int arr[]=new int[5];
try
{
System.out.println(arr[8]);
}catch(ArrayIndexOutOfBoundsException ae)
{
System.out.println("Exception Thrown "+ae);
}
System.out.println("Instruction executed After Exception is thrown i.e. out of try catch block");
}
}
0 comments:
Post a Comment