Question #182423

*Based on answer choices A-E, what is the code's output?


4. Given the following code, the output is __.


String str = new String("persistent");

System.out.print(str.indexOf('e'));

A. 0

B. 1

C. 2

D. 3

E. 4


Expert's answer

Answer:

B. 1

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS