package dk.itu.oop.lecture5; class PrintWords2 { public static void main(String[] args){ String[] words = {"The", "course", "Object", "Oriented", "Programming","has", "Introduction", "to", "Programming", "(GP)", "as", "a", "prerequisite"}; OOPIterator itr = new ArrayIterator(words); OOPIterator sf = new FilterIterator(itr){ public boolean condition(Object o){ return ( (String)o).length() >= 6; }}; IteratorTest.print("Words at least 6 long", sf); } }