
Patrick B. answered 05/25/19
Math and computer tutor/teacher
The following code works.
You pass the delimiter as " "
that is, a single blank space inside double quotes
=================================================
class TestStrSplit
{
public static void main(String args[])
{
String strBuff = new String("The quick brown fox jumped over the lazy dogs !!!!");
String [] tokens = strBuff.split(" ");
for (int iLoop=0; iLoop<tokens.length; iLoop++)
{
System.out.println(tokens[iLoop]);
}
}
}