title: figuring out what counts as an instruction in java code
body: <p>I'm trying to figure out what constitutes an instruction in java code. In class lecture that I attended professor mentioned 7 things that can be constituted as instruction but. I am having trouble making out what.</p>
  
  <p>assignment, access of array, return statement, addition multiplication subtraction,..</p>
  
  <p>Here is a example code she gave out:</p>
  
  <pre><code>int sum = 0;
  int i = 0;
  while ( i &lt; 3 ) {
      sum += A[ i ];
      i++;
  }
  </code></pre>
  
  <p>she says there are total of 18 instructions in this java code but I only count 15. Could you guys clarify why this is.</p>