title: get second digit from int
body: <p>I have an int that ranges from <code>0-99</code>. I need to get two separate ints, each containing one of the digits. I can't figure out how to get the second digit. (from <code>64</code> how to get the <code>6</code>) This is my code: </p>
  
  <pre><code>public int getNumber(int pos, boolean index){//if index = 1 - first digit, if index = 0 - second digit 
      int n;
      if(index){
          n = pos%10;
      }else{
          if(pos&lt;10){
              n=0;
          }else{
              //????
          }
      }
      return n; 
  }
  </code></pre>