I need my Java program to take a string like:
\"This is a sample sentence.\"
and turn it into a string array like:
{\"this\
The easiest and best answer I can think of is to use the following method defined on the java string -
String[] split(String regex)
And just do "This is a sample sentence".split(" "). Because it takes a regex, you can do more complicated splits as well, which can include removing unwanted punctuation and other such characters.