Examlex

Solved

Public Class Exceptions

question 59

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.


Definitions:

Glass-Steagall Act

A law enacted in 1933 to separate commercial banking from investment banking, aimed at reducing conflicts of interest and preventing future financial crises.

Credentialed Public Accountant

A licensed accounting professional who has met certain education and experience requirements and passed a qualifying exam.

Professional Accountant

An individual who is certified to practice accounting and is held to a set of standards by a regulatory body.

Related Questions