25.
// infer generics doesn't throw error but most compilers throw warnings.
List<String> list = new ArrayList<String>(),removeList = new ArrayList<String>();
list.add("hey");
for(String string : list) {
// list.remove(string) throws exception because you can't remove while iterating through a list unless your using an iterator.
removeList.add(string);
}
// fix to make a new list and remove y collection from x list.
list.remove(removeList);
also in java 8 api under collections there is a new method that is called removeIf and with a interface with a boolean to check what object to return.
your not going to get good java developers that can answer all these questions for cheap huehue.