X991: Find Last Space

Implement the following method so that it returns the index of the last space (" ") in the string.

For example:

  • If we call this method with the string "I'm making Waffles", this method would return 10, which is the index of the " " character between the 'g' in "making" and the 'W' in "Waffles".

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.