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.
What will be an ideal response?
finally{ System.out.println(array);}
You might also like to view...
Pointers may be assigned which of the following values?
a. Any integer values. b. An address. c. NULL. d. Both (b) and (c).
__________ computing is defined as that type of computing in which the correctness of the system depends not only on the logical result of the computation but also on the time at which the results are produced.
Fill in the blank(s) with the appropriate word(s).
FIGURE AC 1-1
Referring to Figure AC 1-1 above, if you sorted the database on "Last Name," you would be sorting on a ____.
A. field selector B. database selector C. row selector D. datasheet selector
Which of the following is NOT a described IDPS control strategy?
A. centralized B. fully distributed C. partially distributed D. decentralized