Skip to content

Instantly share code, notes, and snippets.

@lichenbo
Created April 19, 2014 15:34
Show Gist options
  • Save lichenbo/11087832 to your computer and use it in GitHub Desktop.
Save lichenbo/11087832 to your computer and use it in GitHub Desktop.
ArrayList<Integer> al = new ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6));
for (int i : al) {
if (i == 3)
al.remove(i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment