MCQs > IT & Programming > Java > Output of following code? String string = 'UpWork'; System.out.println(string.indexOf('o',5))?

Java MCQs

What will be the output of following code? String string = "UpWork"; System.out.println(string.indexOf("o",5))?

Answer

Correct Answer: "-1"

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it