Whats the use by creating an empty immutable list using emptylist()?
Answers
Answered by
0
Solution:
For that it need a method that takes a List of addresses as a parameter, and can't take null (the List is required as not-null), but there's no addresses to pass, so we have to pass an empty list. Instead of creating yet another empty list to pass, just pass Collections. EmptyList() and it costs nothing.
Thus this is the required answer.
Similar questions
Computer Science,
7 months ago
History,
7 months ago
Geography,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago
English,
1 year ago