Checking if there were no arguments on commandline
<p>While I was going through some tutorial one of the source code file had following to check if there were no command-line arguments :</p>

<pre><code>if (null==args[0]) {
  System.err.println("Properties file not specified at command line");
  return;
}
</code></pre>

<p>Which for obvious reasons throws ArrayIndexOutOfBoundsException and doesn't print the message.</p>

<p>So,how to do this check and print the message without getting the exception being thrown?</p>
