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