false &&
false → false
false &&
true → false
true &&
false → false
true &&
true →
The evaluation is guaranteed to proceed in strict left to right order and if any boolean is false, it does not evaluate any expressions to the right of
// if s is null, Java won't try to test the length of s if ( s != null && s.length() > 0 ) { out.println( "non empty string" ); }
This page is posted |
http://mindprod.com/jgloss/mccarthyandoperator.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\mccarthyandoperator.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[13.58.110.182] |
| |
Feedback |
You are visitor number | |