I am trying to use indexOf(" "); on this string
"This i$ an aardvaAr yeEeeAs onDo qwerty XYZ9";
this is my code
space = word.indexOf(" ");
tempWord = word.substring(0, space);
Now I get what I want which is This string but now how do I get the next space which has this after it:i$, and the next one unitl the end of the string?
*EDIT
Please no arrays for this question
StringusingString[] substringsNoSpace = word.split(" ");java.util.Scannerorjava.util.regex.Patternor justStringclass methods?java.util.Scanneris for first year project, so it's up to you indeed. Also, you can always add results of further investigation to your project only if you demonstrate that you understand the proposed solution :).