public static void main(String[] ar) {
List list = new ArrayList();
list.add("core java");
list.add("php");
list.add("j2ee");
list.add("struts");
list.add("hibernate");
Iterator itr = list.iterator();
while (itr.hasNext()) {
System.out.println(itr.next());
}
list.remove("php");
/* while (itr.hasNext()) {
System.out.println(itr.next());
}*/
}
problem in itr object.it holds the list object reference