Not sure of readability, but this surely is a neat trick to avoid null pointer exceptions, etc. (and it can be extended to cover other, related cases..):<p><pre><code> String myString = null;
if ("foobar".equals(myString)) { /* ... */ }</code></pre>