Hi,
I can explain you reg.
boolean y==true==false==true;
It should be written as
boolean y=true==false==true; there should not be == after y
the evaluation is from right to left.
so y = true==false==true;
>> = true==(false==true);// bcoz false!=true therefore val of //expression is false
>> = true==(false);
>> = true==false; // here too val if exp is false;
>> = false;
therefore y = false
HTH
sasi
Originally posted by Michael Lin:
I found the operator oder is different between bit shift and bitwise:
what is the order for:
8 | 9 & 10 ^ 11
and what is:
int x= 8 >> 9 <<< 10 >> 11
and what is:
boolean y==true==false==true;
can anybody please explain to me?
Thanks.