1 <p> It is often a better design to
2 return a length zero array rather than a null reference to indicate that there
3 are no results (i.e., an empty list of results).
4 This way, no explicit check for null is needed by clients of the method.</p>
6 <p>On the other hand, using null to indicate
7 "there is no answer to this question" is probably appropriate.
8 For example, <code>File.listFiles()</code> returns an empty list
9 if given a directory containing no files, and returns null if the file
10 is not a directory.</p>