Online Java Compiler By
JavaTpoint.com
import java.util.*; public class CollectionsEmptyIteratorExample3 { public static void main(String[] args) { List
ls = new ArrayList
(); ls.add(1); ls.add(2); ls.add(3); ls.add(4); Iterator
Itr = Collections.emptyIterator(); while(Itr.hasNext()){ System.out.println(Itr.next()); } System.out.println("It is empty Iterator list."); } }
Output