title: How to split a string into 2 equal parts in Java
body: <p>I want to divide a string like this:</p>
  
  <pre><code>String = "Titanic";
  </code></pre>
  
  <p>into two strings of equal length, and if it isn't divisible by 2 it will have 1 letter or extra on first or second part. like this</p>
  
  <pre class="lang-java prettyprint-override"><code>//if dividle by 2
  Str1 = "BikG";
  Str2 = "amer";
  
  //if it isnt dividle by 2
  Str1 = "Tita";
  Str2 = "nic";
  </code></pre>