Code:
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);
}}
Answer true , false,false . I wonder why?
My assumption is && is of higher precedence than ||. So the answer should be true,true,true.