Page 1 of 1

About Question enthuware.ocajp.i.v7.2.949 :

Posted: Wed Oct 10, 2012 12:16 pm
by ETS User
There seems to be a mistake in the example given in the explanation.

"Because all an if() needs is a boolean, now b1 != b2 returns false which is a boolean and as b2 = false is an expression and every expression has a return value (which is actually the Left Hand Side of the expression). Here it returns true which is again a boolean."

The last statement in the above 'Here it returns true which is again a boolean.' is not correct as
'if(b2=false)' will result in false (and not true) as it is an assignment.

Re: About Question enthuware.ocajp.i.v7.2.949 :

Posted: Wed Oct 10, 2012 5:54 pm
by admin
You are right. This has now been fixed.
thank you for your feedback!