title: Java - get the quotient and remainder in the same step?
body: <p>It seems that in order to find both the quotient and remainder of a division in Java, one has to do:</p>
  
  <pre><code>int a = ...
  int b = ...
  
  int quotient = a / b;
  int remainder = a % b;
  </code></pre>
  
  <p>Is there a way to write this so that the quotient and remainder are found in a single step (one division operation)? Or does Java already automatically optimize this code so that they are?</p>