@Test
public void testRemove(){
Collection<String> c = new HashSet<String>();
c.add("java");
c.add("php");
c.add("cpp");
c.add("c#");
Iterator<String> it = c.iterator();
while(it.hasNext()){
String str = it.next();
if(str.indexOf('c')!=-1){
it.remove();
}
}
System.out.println(c);
}
}