Skip to content

Instantly share code, notes, and snippets.

@jakubjanecek
Created February 10, 2013 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakubjanecek/4749485 to your computer and use it in GitHub Desktop.
Save jakubjanecek/4749485 to your computer and use it in GitHub Desktop.
List<Integer> odds = new ArrayList<Integer>();
for (int n : collectionOfNumbers) {
if (n % 2 == 1) {
odds.add(n);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment