Defining Strings as Null is better or as Empty Strings
<p>I come from a C#.net background and whenever I had a string I was declaring it as <code>String.Empty</code>
Now I am looking at a Java code from a co-worker and he has declared his strings in a method like this:</p>

<pre><code>String myStr = null;
</code></pre>

<p>I don't like it, and even worse, he is assigning values to these strings in an "IF" block where it may or may not even qualify, and then at the end of the method he is calling a <code>myStr.length()</code> on them.</p>

<p>So my question is what is a preferred way in Java? do you think is it better to define them as <code>String.Empty</code> OR leave them as <code>null</code> and do a <code>null</code> check just before calling <code>.length()</code> on them?</p>
