Mastering Java Exception Handling Quiz

UnrestrictedDune avatar
UnrestrictedDune
·
·
Download

Start Quiz

Study Flashcards

Questions and Answers

Which of the following is NOT a checked exception in Java?

RuntimeException

What will be the output of the following code snippet?

try { int[] arr = new int[5]; System.out.println(arr[10]); } catch (ArrayIndexOutOfBoundsException e) { System.out.println("Array index out of bounds!"); }

Array index out of bounds!

Which of the following statements about exception handling in Java is correct?

The catch block can handle multiple types of exceptions.

More Quizzes Like This

Use Quizgecko on...
Browser
Browser