I'm looking to split a sentence into an array of words separated by a comma in Java.
That is, I want a sentence like:
"The dog jumped"
"high over the"
to become
"The,dog,jumped"
"high,over,the"
I can't seem to get it to pick up the space and insert with a comma using the .split(",") method but that doesn't appear to work, the result is still the original. Ideas? Thanks!