It seems that in order to find both the quotient and remainder of a division in Java, one has to do:
int a = ...
int b = ...
int quotient = a / b;
int remainder = a % b;
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?