Create an empty List in Java
Description
The following code shows how to create an empty List.
Example
/* w w w . j a va2 s .co m*/
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class Main {
public static void main(String args[]) {
List list = Collections.EMPTY_LIST;
List<String> s = Collections.emptyList();
}
}