title: Splitting Full Name
body: <p>I have string for instance, "John Daws Black" splitted with spaces and I need to split them to two parts so that there will be name part like "John Daws" and surname part like "Black". However the front name part can be any length like "John Erich Daws Black". My code can get the last part:</p>
  
  <pre><code>public String getSurname(String fullName){
      String part = "";
       for (String retval: fullName.split(" "))
           part = retval;
           return part;
  }
  </code></pre>
  
  <p>But I don't know how to get the front part.</p>