Collections.emptyEnumeration() has the following syntax.
public static <T> Enumeration <T> emptyEnumeration()
In the following code shows how to use Collections.emptyEnumeration() method.
/*from w w w .j a va 2 s . c om*/ import java.util.Collections; import java.util.Enumeration; public class Main { public static void main(String[] args) { } public static Enumeration getMy(){ String nullFlag = null; if(nullFlag == null){ return Collections.emptyEnumeration(); } return null; } }