Skip to main content

Java Topic Practice

substring and indexOf

substring and indexOf MCQ Practice

Question 1 of 15

Answered 0 of 15

Choose one answer.

What is printed by the following code segment?

String word = "ALGORITHM";
int idx = word.indexOf("QZ");
System.out.print(idx);
Choose one answer.