title: Split String with .(dot) character java android
body: <p>Hello friends i have string like </p>
  
  <pre><code>Android_a_b.pdf
  </code></pre>
  
  <p>i want to split it like <code>Android_a_b</code> and <code>pdf</code></p>
  
  <p>i try following code like </p>
  
  <pre><code>String s="Android_a_b.pdf"; 
  String[] parts = s.split(".");
  String part1 = parts[0];  
  String part2 = parts[1];  
  </code></pre>
  
  <p>when i run above code it give me error like </p>
  
  <pre><code>11-05 09:42:28.922: E/AndroidRuntime(8722): Caused by: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
  </code></pre>
  
  <p>at <code>String part1 = parts[0];</code> line</p>
  
  <p>any idea how can i solve it?</p>