185k views
2 votes
What is the index of the first character in a string?
A. 0
B. 1
C. -1
D. 2

1 Answer

3 votes

Answer:

The index of the first character is 0

Explanation:

Using the accessor method the index of the first character is 0, and at the same time the last character is length()-1.

But this is for Java so it might be different for other programs.

If you have any questions feel free to ask in the comments - Mark

ALSO Happy Valentines Day ❤