Question: Can you please help me to solve this java program a) Create an Eclipse Project called Lab2Part2a. Create a simple application called MultipleCatchBlocks. Write a
Can you please help me to solve this java program

a) Create an Eclipse Project called Lab2Part2a. Create a simple application called MultipleCatchBlocks. Write a try catch block in the main method so that ALL of the following exceptions are caught in three different catch blocks [but only ONE try block]: ArrayIndexOutOfBoundsException, ArithmeticException, Exception. Ensure that you place the most generic exception as the last catch block (normally Eclipse will prevent you doing otherwise!). Add a simple test output statement to each of the catch blocks so that you can identify if the catch block was executed, e.g., "You are trying to access beyond the array bounds". Add printStackTrace() to each catch block. Place code in the try block to test at least one of the exceptions listed (e.g. you could create an array of size four and then try to access a non-existant fifth index [4] to generate an ArrayIndex0utOfBoundsException, or you could try dividing a number by zero (to create ArithmeticException). Required activities and marking guideline: - Implement the try - Write all three catches with stack trace and output [3 pts each] - Insert sample error and test catch block
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
