๐Ÿ‘‰๐Ÿป Return an empty collection not null (๐Ÿ“š Effective Java by @joshbloch) Java methods that return a collection should return an empty collection to show nothing was returned. If we return null, it creates extra work for the caller because they must check for it.

Mar 25, 2022 ยท 7:19 PM UTC

7
49