Why is && preferable to & and || preferable to |?
&&
&
||
|
I asked someone who\'s been programming for years a
Simply,
if exp1 && exp2
if exp1 is flase don't check exp2
flase
but
if exp1 & exp2
if exp1 is false Or true check exp2
false
true
and rarely people use & because they rarely want to check exp2 if exp1 is false