What is the first thrown exception in the following code? pu…
What is the first thrown exception in the following code? public static void main(String[] args) { try { methodA(); methodB(); methodB(); } catch (Exception e) { System.out.println(“Got this!”); } try { methodB(); methodA(); } catch (Exception e) { System.out.println(“Got this!”); } } public static void methodA() throws Exception { methodB(); throw new ClassNotFoundException(); } public static void methodB() throws Exception { try { methodC(); } catch (FileNotFoundException e ){ throw new ArrayIndexOutOfBoundsException(); } catch (Exception e) { throw new FileNotFoundException(); } methodC(); } public static void methodC() throws Exception { throw new NumberFormatException(); }