title: How to convert a byte in binary representation into int in java
body: <p>I have a String[] with byte values</p>
  
  <pre><code>String[] s = {"110","101","100","11","10","1","0"};
  </code></pre>
  
  <p>Looping through s, I want to get int values out of it.</p>
  
  <p>I am currently using this</p>
  
  <pre><code>Byte b = new Byte(s[0]); // s[0] = 110
  int result = b.intValue(); // b.intValue() is returning 110 instead of 6
  </code></pre>
  
  <p>From that, I am trying to get the results, {6, 5, 4, 3, 2, 1}</p>
  
  <p>I am not sure of where to go from here. What can I do?</p>
  
  <p>Thanks guys. Question answered.</p>