check if a collection is empty in java : Which is the best method
<p>I have two ways of comparing if a List is empty or not</p>

<pre><code>if (CollectionUtils.isNotEmpty(listName)) 
</code></pre>

<p>and </p>

<pre><code>if(listName != null &amp;&amp; listName.size() != 0)
</code></pre>

<p>My arch tells me that the former is better than latter. </p>

<p>But I think latter is better. Can anyone please clarify it.</p>
