About Question enthuware.ocajp.i.v8.2.1408 :
Posted: Sun Feb 13, 2022 1:01 pm
Hello! The explanation states that "Comparison operators have lower precedence than mathematical operators."
But what if we have something like this:
int x1 = 50, x2 = 75;
boolean b = x1 >=x2;
Is it equal to boolean (b = x1) >=x2; or to boolean b = (x1 >=x2);?
What will be evaluated first: the comparison or assigning x1 value to b?
But what if we have something like this:
int x1 = 50, x2 = 75;
boolean b = x1 >=x2;
Is it equal to boolean (b = x1) >=x2; or to boolean b = (x1 >=x2);?
What will be evaluated first: the comparison or assigning x1 value to b?