Limited access

Upgrade to access all content for this subject

Which of the following is the best explanation for the String method listed below?

public int indexOf(String s)
A

It is used to determine the number of characters in the string .

B

It returns the number of non-space characters in the string.

C

It returns the characters from the given position s to the end of the string.

D

It returns the position where the string s is first found in the original string, or 0 if not found.

E

It returns the position where the string s is first found in the original string, or -1 if not found.

Select an assignment template