2 ms·
In this very specific instance, you could easily and idiomatically reuse a single instance of an immutable empty list: https://docs.oracle.com/javase/7/docs/ap
by RodgerTheGreat 10y ago
In this very specific instance, you could easily and idiomatically reuse a single instance of an immutable empty list:
https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#emptyList() https://docs.oracle.com/javase/7/docs/api/java/util/Collecti...
No dynamic heap allocation necessary.