In Java, we have Collections.emptyList() and Collections.EMPTY_LIST. Both have the same property:
Returns the empty list (immutable). This list is ser
In other words, EMPTY_LIST is not type safe:
List list = Collections.EMPTY_LIST; Set set = Collections.EMPTY_SET; Map map = Collections.EMPTY_MAP;
As compared to:
List s = Collections.emptyList(); Set l = Collections.emptySet(); Map d = Collections.emptyMap();