Returns an empty list (immutable). This list is serializable.
This example illustrates the type-safe way to obtain an empty list:
List<String> s = Collections.emptyList();
<T> | type of elements, if there were any, in the list |
EMPTY_LIST
@implNote
Implementations of this method need not create a separate List
object for each call. Using this method is likely to have comparable
cost to using the like-named field. (Unlike this method, the field does
not provide type safety.)
Diagram: Collections