Answer to Question #181339 in Java | JSP | JSF for Phil

Question #181339

*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


1
Expert's answer
2021-04-17T22:09:32-0400

The code's output is: 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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog