Hello all,
My question is which of the following operators has highest precedence?
a). &&
b). ||
Which operator gets first evaluated when both are present in an expression?
in Khalid-Mughal book he has shown && operator having highest precedence than ||.
According to Khalid,the output of the following code should be "false,true,true" but i am getting "true,false,false"(jdk1.4.2_03).
can u tell me why so ?
class EBH202 {
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);
}}