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:

Other Income

Income derived from activities that are not part of a company’s primary business operations.

Operating Activity

Operating activity involves the primary functions of a business that relate to its provision of goods and services to the market.

Expenses

Assets used up or services consumed in the process of generating revenues.

Retail Business

A business that sells goods or services directly to consumers for personal or household use.

Related Questions