Java split() of String | Multiple whitespace characters

The split method of the String class is very useful when you want to tokenize a string. Its power lies in the fact that it accepts a string, as a parameter, which can be a regular expression. However you must be careful when you want to split a string using the whitespace character as a delimiter. Consider the following snippet of code: Stringstr="Testing split using two whitespace characters";String[]tokens=str.split("\\s");for(Stringtoken:tokens){System.out.println("-"+token+"-");} What’s the output produced by the previous code?