title: Difference between += and ++ in Java
body: <p>I have a global variable that I modify in three different methods. It starts at 0, one method adds by 3, the next one by 2 and the last one by 1. They are all related to a button of their own.</p>
  
  <p>When I click the "plus 1" button, the counter remains at 0 and I need another push to get it to 1. Interestingly, if I start with the other two buttons the counter acts accordingly but if I click my "plus 1" button again, it needs two pushes and acts weird like if it was holding the add...</p>
  
  <pre><code> public void addThreeForTeamB(View view) {
      displayForTeamB(scoreTeamB += 3);
  }
  
  public void addTwoForTeamB(View view) {
      displayForTeamB(scoreTeamB += 2);
  }
  
  public void addOneForTeamB(View view) {
      displayForTeamB(scoreTeamB ++);
  }
  </code></pre>
  
  <p>So that's the way it is managed, the cool thing is that when I change the last method to a "scoreTeamB += 1" it acts as it should, just adding without conflict.</p>
  
  <p>My question is about the difference between this two operators to better understand the reason behind the slight discrepancy generated when using this 2 operators on the same variable.</p>