title: Combine indexof and Subtring
body: <p>I only want to retrieve the last name with the indexof and subtring</p>
  <p>Let me show you the code :</p>
  <pre><code>public class ssq {
      public static void main(String args[]) {
          String chaine = &quot;Durand;Marcel;2 523.5&quot;;`
  </code></pre>
  <p>I only want to retrieve Durand.</p>
  <p>I tried this</p>
  <pre><code>System.out.println(chaine.indexOf(&quot;;&quot;),chaine.substring(0,6));
  </code></pre>