?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Easy

String indexOf and substring Methods

APCSA-KNVXJP

Consider the following code segment.

String phrase = "Great players are really serious at practice";
System.out.println(phrase.indexOf(phrase.substring(15,17)));

What is printed as a result of executing the code segment?

A
1
B
re really serious at practice
C
15
D
re
E
18