Hi,
I am getting confused with the following example. Eventhough && has higher precedence the expression is evaluated differently. Please explain me.
class
Test {
static boolean
ant(){
System.out.println("within method");
return true;
}
public static void main(
String[] args) {
boolean a , b, c;
a=b=c=false;
System.out.println((a=true) || (b= ant()) && (c=true));
System.out.println(a+ "," + b+"," +c);
}
}
out put is : true
true, false, false