Short Answer
public class exceptions
{
public static void main(String Args[])
{
int[] array = new int[3];
try
{
for(int a=0;a<4;++a)
{
array[a] = a;
}
System.out.println(array);
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("Out of bounds");
}
}
}
In the above code, the line System.out.println(array); gets skipped when an exception occurs. Write a finally block that will execute, and will execute a System.out.println(array); if there is an exception.
Correct Answer:

Verified
finally
{...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
{...
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q54: The parent class of Error is _.<br>A)
Q55: <img src="https://d2lvgg3v3hfg70.cloudfront.net/TBX9006/.jpg" alt=" The figure above
Q56: The memory location known as the _
Q57: Which method constructor constructs a new exception
Q58: Match each term with the correct statement
Q60: When you catch an Exception object, you
Q61: Match each term with the correct statement
Q62: The _ class comprises less serious errors
Q63: When an exception is a checked exception,
Q64: import java.util.*; <br>public class DivisionMistakeCaught3 <br>{ <br> public