title: Java primitive variable reassignment during expression
body: <p>I had a question in my test that I got confused about (code attached below). To put it shortly, I thought that the variables are reassigned and then added back as a value to the expression (making the output &quot;8, 10&quot;) but seems like the original value somehow is not changed. What am I missing?</p>
  <p>p.s. Sorry if a similar question exists, I couldn't find one (probably its too obvious :P).</p>
  <pre><code>class InitTest{
      public static void main(String[] args){
          int a = 10;
          int b = 20;
          a += (a = 4);
          b = b + (b = 5);
          System.out.println(a + &quot;,  &quot; + b);
      }
  }
  </code></pre>