title: Where exactly `hash == 1` performed in Java?
body: <p>If we have the code like this:</p>
  
  <pre><code>class A {
    private hash = 0;
  
    public void test(){
      if (hash == 1) {
      //dosomething
      }
    }
  }
  </code></pre>
  
  <p>Where exactly the compare performed ? </p>
  
  <p>Here's my understanding:</p>
  
  <ol>
  <li>Load hash into thread's stack, named r1.</li>
  <li>compare r1 with literal 1.</li>
  </ol>
  
  <p>Is it right ? In the meaning time, the hash in the heap could be changed ?</p>