title: How to substring a string to the second dot (.) in Java?
body: <p>I have a String which has many segments separated by a dot (<code>.</code>) like this:</p>
  
  <blockquote>
    <p>codes.FIFA.buf.OT.1207.2206.idu</p>
  </blockquote>
  
  <p><br>
  I want to get a substring only until second dot, like <code>codes.FIFA</code>.</p>
  
  <p>How to substring just until the second dot?</p>