import java.util.ArrayList;
import java.util.Iterator;
public class javafor {
public static void main(String[] args) {
ArrayList list = new ArrayList();
list.add(new Integer(111));
list.add(222);
list.add(new Integer(333));
list.add(444);
Iterator it = list.iterator();
for (; it.hasNext();) {
System.out.println(it.next());
}
}
}
Output
111 222 333 444If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.