Given: What is the result?
A.
An ArrayIndexOutOfBoundsException is thrown at runtime
B.
A NullPointException is thrown at runtime
C.
d is output
D.
There is no output
E.
A StringIndexOutOfBoundsException is thrown at runtime
F.
A StringArrayIndexOutOfBoundsException is thrown at runtime
Answer given is correct, tried it in eclipse
E
Answer: E
Explanation:
The method charAt(int index) throws an IndexOutOfBoundsException if the index argument is negative or not less than the length of this string.
In this case since the object is a string and 11 is not less than the length of this string the StringIndexOutOfBoundsException(a subclass of IndexOutOfBoundsException) will be thrown.