Skip to content

Instantly share code, notes, and snippets.

@copiousfreetime
Last active August 29, 2015 14:26
Show Gist options
  • Save copiousfreetime/99bffcc6c9d68ae4be9b to your computer and use it in GitHub Desktop.
Save copiousfreetime/99bffcc6c9d68ae4be9b to your computer and use it in GitHub Desktop.
List numbers = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
int result = 0;
for(int i = 0; i < numbers.size(); i++) {
if ((numbers.get(i) > 5) &&
(isEven(numbers.get(i))) &&
(numbers.get(i) < 9) &&
(numbers.get(i) * 2 > 15)) {
result = numbers.get(i);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment