[Wayne]: isEven = number % 2 == 0; [Wililam]: That may be legal, but it isn't read-able. It's not? Ummm... how about now? boolean isEven = (number % 2 == 0); [Tom]: isEven = number%2==0?true:false; OK, now that one's pretty funny.
"I'm not back." - Bill Harding, Twister
Joined: Oct 29, 2003
Originally posted by William Barnes:
That may be legal, but it isn't read-able.
Actually writing code like this (instead of the first example) is one of the first ways to separate yourself from the newbie programmers. It is as readable as the first example, and much more concise. Perogi.