title: Java: compare String var to int
body: <p>I request variable from the server (String xxx) and receive it properly (it equals 1).
  Then I want to use it in 'if' statement, so I do :</p>
  
  <pre><code>if(xxx.equals(String.valueOf(1)))
  </code></pre>
  
  <p>but it doesn't work the way it supposed to be - it should be equal, but it works as it is not.</p>
  
  <p>I'm out of solutions. What am I doing wrong ?</p>