×
×
Correct!
Insert the missing parts to handle the error in the code below.
@(3) {
int[] myNumbers = {1, 2, 3};
System.out.println(myNumbers[10]);
} @(5) (Exception e) {
System.out.println("Something went wrong.");
}
try {
int[] myNumbers = {1, 2, 3};
System.out.println(myNumbers[10]);
} catch (Exception e) {
System.out.println("Something went wrong.");
}
Not CorrectClick here to try again. Correct! |
This will reset the score of ALL 59 exercises.
Are you sure you want to continue?