Question: Given the following code segment, what output would be generated? int rupees = 500; String [] inventory = new String[10]; try { inventory[10] = Deku
Given the following code segment, what output would be generated?
| int rupees = 500; String [] inventory = new String[10]; try { inventory[10] = "Deku Mask"; rupees -= 100; } catch (Exception ex) { rupees += 100; } catch (IndexOutOfBoundsException ex2) { rupees -= 200; } finally { rupees += 300; }
System.out.println(rupees); | |
|
600 800 900 700
ONE OF THE ANSWERS IS CORRECT |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
