how to check for an empty array java : <p>I wanted to know if this code is valid for checking whether an array is empty, or should I check for null?</p>

<pre><code>if(arrayName={})
  System.out.println("array empty");
else System.out.println("array not empty");
</code></pre>

<p>Thank you!</p>
