title: Java array split string
body: <p>I have an array with each element containing first and second names,       </p>
  
  <pre><code> eg array[0] = bob dylan
      array[1] = johny cash
  </code></pre>
  
  <p>I want to take those names, split them, and assign the first name to element[0] of a new array, and the surname to element[1] of the new array,</p>
  
  <pre><code>  eg newArray[0] = bob
       newArray[1] = dylon
       newArray[2] = johny
       newArray[3] = cash
  </code></pre>
  
  <p>Here's where I'm at so far:</p>
  
  <pre><code>  String name;
    for( int i = 0; i &lt; array.length; i++ ){
          System.out.println( "Enter the singers First name and Surname:" );
          name = s.nextLine();
          array[ i ] = name;
      }
  </code></pre>
  
  <p>I've got both arrays ready but i'm unsure whether I need to take the array elements and assign them to a string 1 by 1, then split them and put them in a new array, or perhaps theres a way to look at each element of a string[] and split them and assign to a new array without needing to use seperate strings. Many Thanks</p>