Hi,
Can anyone help me in operator precedence for short-circuit and bitwise operator.
I found in net that && has more precedence than the ||, after executing the below code from (
http://www.danchisholm.net) i really doubt it. I expected the answer to be true, true, true.
class BooleanTest{
static boolean a, b, c;
public static void main(
String args[]){
boolean x = (a = true) || (b = true) && (c = true);
System.out.print(a + "," + b + "," + c);
}
}
got answer as : true, false, false
Thanks in Advance,
Sangeetha