Why is && preferable to & and || preferable to |?
I asked someone who\'s been programming for years a
&& is the short circuit version of &.
If we are evaluating false & true, we already know from looking at the first argument that the result will be false. The && version of the operator will return a result as soon as it can, rather than evaluate the whole expression. There is also a similar verion of the | operator, ||.