How does Java handle the intermediate values while evaluating a long arithmetic expression?

I was wondering how does Java handle the intermediate values while evaluating a mathematical expression specially when the intermediate values exceeds their storage size. For an example, int a = 1103515245; int x = 1013904223; int c = 2531011; x = (a*x + c) & 0x7FFFFFFF; // to make sure x will remain a positive… Read More How does Java handle the intermediate values while evaluating a long arithmetic expression?