3 ms·
Regarding pattern 3, I think the most correct way to do what the author proposes is to use Collections.EmptyList(). You get an immutable empty list, which by vi
by RodgerTheGreat 8y ago
Regarding pattern 3, I think the most correct way to do what the author proposes is to use Collections.EmptyList(). You get an immutable empty list, which by virtue of being immutable need only be allocated once.
[1] https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#emptyList() https://docs.oracle.com/javase/7/docs/api/java/util/Collecti...