http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#18498 Procedence help you determine the meaning of an expression.
2 + 3 * 4 = 2 + ( 3 * 4 ) = 14
it does not mean
2 + 3 * 4 = ( 2 + 3 ) * 4 = 20
because * has higher procedence than +. However 2 is still evaluated before 3 * 4 because arithematic expressions evaluate left to right.
Short circuit logical operators ( &&, | | ) also evaluate left to right, if the result can be determined from the left operand, the right operand is not evaluated.
Here is a program that proves my point.
C:\JavaRanch>
java Proc1
in f()
in g()
in z()
14
logical operations evaluate left to right, here is the left hand side
i = 2 the right operand is not evaluated
logical operations evaluate left to right, here is the left hand side
i = 2 the right operand is not evaluated
[This message has been edited by huiying li (edited March 09, 2001).]