Originally posted by Barry Gaunt:
No you are not correct. Check out your BASIC Java book on how an expression like "t++ > m" is evaluated. Or write a simple piece of code to print the values of "t++ > m" and t.
[ December 26, 2004: Message edited by: Barry Gaunt ]
Barry,
Why it's not correct?
I think what JayaSiji is probably correct, as the
postfix ++ operator in this case is evaluated after the comparsion, and the original value for t is used instead.
So, for an example :
This piece of code will evaluate to true, as the
value 0 of xxx is used in the comparison, and when the print statement executes, it will print :
Equals 1 : 0 Any thoughts?
<b>If you do things well, do them better. Be daring, be first, be just.</b><br />SCJP <b>98.4%</b>