Solved

Suppose S Is a String with the Value "Java

Question 2

Multiple Choice

Suppose s is a string with the value "java". What will be assigned to x if you execute the following code? char x = s.charAt(4) ;


A) 'a'
B) 'v'
C) Nothing will be assigned to x, because the execution causes the runtime error StringIndexOutofBoundsException.
D) None of the above.

Correct Answer:

verifed

Verified

Related Questions