KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to think of the best way to return an empty array, rather than null . Is there any difference between foo() and bar() ? private static File[] foo() { return Collections.emptyList().toArray(new File[0]); } private static File[] bar() { return new File[0]; }
Tags (comma-separated)
Save Edits
Cancel