title: How to split an integer in Java
body: <p>I am trying to implementing Karatsuba's algorithm from wikipedia and I cannot continue to code since I do not know to how to split an integer into lower-half and upper-half. For example, if we have an integer 223, then it should be split into two integer 22 and 3.</p>
  
  <p>How I might do this?</p>
  
  <p>so it has to be something like</p>
  
  <pre><code>num1 = 223;
  </code></pre>
  
  <p>some magical stuff happening here!</p>
  
  <pre><code>low1 = 22;
  low2 = 3;
  </code></pre>
  
  <p>Thank you very much I really appreciate your help!</p>