Limited access

Upgrade to access all content for this subject

Consider the following code segment.

// there are single spaces between each word in myPhrase
String myPhrase = "Charlie does not tell lies";
int liePos = myPhrase.indexOf("lie" ) ;
System.out.print( liePos );

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

A

26

B

23

C

22

D

4

E

0

Select an assignment template