Created
February 25, 2015 03:08
-
-
Save treesouth/c46e0a2d0bf344b0ed4b to your computer and use it in GitHub Desktop.
ArrayList删除特定元素
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iterator<Integer> iterator = list.iterator(); | |
while(iterator.hasNext()){ | |
int i = iterator.next(); | |
if(i == 1){ | |
iterator.remove(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment