I need my Java program to take a string like:
\"This is a sample sentence.\"
and turn it into a string array like:
{\"this\
Most of the answers here convert String to String Array as the question asked. But Generally we use List , so more useful will be -
String dummy = "This is a sample sentence."; List wordList= Arrays.asList(dummy.split(" "));