6
The first occurrence of the string "a" within the method's string is at index 6.
indexOf()
Play with the following to gain insight into indexOf()
.
Try searching for the second occurrence of "ant" in the line. Pay attention to spaces.
What is the index of the empty string "" ?