title: How to find first character after second dot java
body: <p>Do you have any ideas how could I get first character after <strong>second</strong> dot of the string.</p>
  
  <pre><code>String str1 = "test.1231.asdasd.cccc.2.a.2";
  String str2 = "aaa.1.22224.sadsada";
  </code></pre>
  
  <p>In first case I should get <code>a</code> and in second <code>2</code>.
  I thought about dividing string with dot, and extracting first character of third element. But it seems to complicated and I think there is better way.</p>