What exception does LINE A throw?
Correct Answer : D
Here, no exception is thrown as everything declared and evaluated correctly. The upper limit of an evaluated variable is not exceeding the declared variable's upper limit. For an array of size
4, the valid indices are
The answer is D.
Topic: Why Java Throws Exceptions