Multiple choice technology programming languages

Identify the correct examples of Exception

  1. Divide by zero error

  2. Accessing the elements of an array beyond its range

  3. Invalid input

  4. Opening an empty file

  5. Hard disk crash

Reveal answer Fill a bubble to check yourself
A,B,C,E Correct answer
Explanation

Exceptions include: Divide by zero (ArithmeticException), array index out of bounds (ArrayIndexOutOfBoundsException), and invalid input (depending on type, could be NumberFormatException, IllegalArgumentException, etc.). Hard disk crash represents an Error (not Exception) but is still a throwable condition. Opening an empty file is not typically an exception - it's a valid file operation that just returns empty data.