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 String substring(int a, int b)
A

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

B

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

C

It returns the characters in the string from index a to index (b - 1).

D

It returns the characters in the string from index a to index b.

E

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

Select an assignment template