In practice, is it better to return an empty list like this:

return Collections.emptyList();

Or like this:

return new ArrayList<Foo>();

Or is this completely dependent upon what you’re going to do with the returned list?

7 Answers
7

Leave a Reply

Your email address will not be published. Required fields are marked *