Question: Write some Java statements that use the String methods indexOf and substring to find the first word in a string. We define word to be
Write some Java statements that use the String methods indexOf and substring to find the first word in a string. We define word to be a string of characters that does not include whitespace. For example, the first word of the string
"Hello, my good friend!"
is the string "Hello,"and the second word is the string "my".
Step by Step Solution
3.34 Rating (166 Votes )
There are 3 Steps involved in it
sentence sentencetrim int space ... View full answer
Get step-by-step solutions from verified subject matter experts
