Question: Answer the following program using Java and the file provided below. Answer this quick program using Java / CSE 114 Lab 20 (Fall 2017) /
Answer the following program using Java and the file provided below.

Answer this quick program using Java
/ CSE 114 Lab 20 (Fall 2017) / Your name: / Your SBU ID: mport java.util.* ublic class Trouble public static void main (String []1 args) problem( System.out.println("Delta"); private static void problem() Random r = new Random( ); int action = r.next1nt (4); if (action -- 1) System.out.println( "About to generate an ArrayIndexOutOfBoundsException...") throw new ArrayIndexOutofBoundsException); if (action - 2) System.out.println("About to generate a NullPointerException..."); throw new NullPointerException ) if (action == 3) System.out.println("About to generate an ArithmeticException..."); throw new ArithmeticException )i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
