30. Then line 6 tries to retrieve the second indexed element. Since there is only one element, this gives a StringIndex0ut0fBoundsException, and Option D is correct.
It should be third indexed element. charAt(1) is the second indexed element,isn't it?