How do I set an empty list of a certain type
Try this
Collections.<String> emptyList();
See this also Type-safe, generic, empty Collections with static generics
Use Collections.emptyList(); You can check the jdk document for it.
To get an empty List
of String
for example:
List<String> list = Collections.<String>emptyList();