venerdì 29 marzo 2013

Q82

Given:
public class x {
       public static void main(String[] args) {
             String theString = "Hello World";
             System.out.println(theString.charAt(11));
       }
}

What is the result?
A.
There is no output
B.
d is output
C.
A StringIndexOutOfBoundsException is thrown at runtime
D.
An ArrayIndexOutOfBoundsException is thrown at runtime
E.
A NullPointException is thrown at runtime
F.
A StringArrayIndexOutOfBoundsException is thrown at runtime
Risposta C.

Nessun commento:

Posta un commento