Create an empty Set in Java
Description
The following code shows how to create an empty Set.
Example
/*from www .j a v a 2 s . c om*/
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[]) {
Set set = Collections.EMPTY_SET;
Set<Long> l = Collections.emptySet();
}
}