while(it.hasNext()) { String str = (String)it.next(); if(str == "abcd") it.remove(); System.out.println(str); }
al: [abc,abcd,abcde]--[abc,abcde]