How to use String.split() to split this string?

My string looks as follow:

str = "fist second  third     forth         fifth";

Can I use split() to split it into 5 sub strings, i.e. without containning the spaces?
Who is Participating?
zzynxConnect With a Mentor Software engineerCommented:
This is it:

        String tmp = "Hello  world   over    there";
        String parts[] = tmp.split("[ ]+");
zzynxSoftware engineerCommented:
I think
         split("([ ]){+}");

I'll check it for you
zzynxSoftware engineerCommented:
Explanation: the delimiter is one or more times a space
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Or simply just use java.util.StringTokenizer like this:

StringTokenizer st = new StringTokenizer("fist second  third     forth         fifth");
     while (st.hasMoreTokens()) {
zzynxSoftware engineerCommented:
StringTokenizer is a legacy class that is retained for compatibility reasons although its use is discouraged in new code.
It is recommended that anyone seeking this functionality use the split method of String or the java.util.regex package instead.
zzynxSoftware engineerCommented:
All Courses

From novice to tech pro — start learning today.