import java.util.Iterator; import java.util.Vector; public class Program02 { public static void main(String args[]) { Vector v = new Vector(); v.add("alma"); v.add("körte"); v.add("barack"); v.add("szilva"); Iterator i = v.iterator(); while (i.hasNext()) { System.out.println(i.next()); } } }