Online Java Compiler By
JavaTpoint.com
import java.util.*; public class CollectionsEmptyEnumerationExample3 { public static void main(String[] args) { List
ls = new ArrayList
(); ls.add(1); ls.add(2); ls.add(3); ls.add(4); Enumeration
enm = Collections.emptyEnumeration(); while(enm.hasMoreElements()){ System.out.println(enm.nextElement()); } System.out.println("It is empty Enumeration list."); } }
Output