I wish to construct the empty list of type List<String>
. The best I can come up with that satisfies the type-checker is:
(List<String>) (Object) List.nil()
which is terribly ugly. Is there something better?
I wish to construct the empty list of type List<String>
. The best I can come up with that satisfies the type-checker is:
(List<String>) (Object) List.nil()
which is terribly ugly. Is there something better?
This should do it:
List<String> myList = list();