Hi,
class EBH202 {
static boolean m1(boolean b){
System.err.println(b+",");
return b;
}
static boolean a, b, c;
public static void main (String[] args) {
boolean x = (a = m1(true)) ||( (b = m1(true)) && (c = m1(false)));
System.out.print(a + "," + b + "," + c);
}
}
---------- intepreter ----------
true,
true,false,false
Output completed (0 sec consumed) - Normal Termination
i am geting this output .
I put the paranthesis to change the priority
I thot
( (b = m1(true)) && (c = m1(false)) this will excute first
Pls explain