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
There is no output
B.
d is output
d is output
C.
A StringIndexOutOfBoundsException is thrown at runtime
A StringIndexOutOfBoundsException is thrown at runtime
D.
An ArrayIndexOutOfBoundsException is thrown at runtime
An ArrayIndexOutOfBoundsException is thrown at runtime
E.
A NullPointException is thrown at runtime
A NullPointException is thrown at runtime
F.
A StringArrayIndexOutOfBoundsException is thrown at runtime
Risposta:A StringArrayIndexOutOfBoundsException is thrown at runtime
Nessun commento:
Posta un commento