Last active
December 31, 2015 10:39
-
-
Save javiergamarra/7974339 to your computer and use it in GitHub Desktop.
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
numbers = Arrays.asList(new Integer[] { 1, 2, 3, 4, 5, 6 }); | |
numberOperations = 0; | |
private boolean isEven(int n) { | |
System.out.println(numberOperations + " - Is " + n + " even?"); | |
numberOperations++; | |
return n % 2 == 0; | |
} | |
private int doubleIt(int n) { | |
System.out.println(numberOperations + " - we double " + n); | |
numberOperations++; | |
return n * 2; | |
} | |
private boolean isGreaterThan5(int n) { | |
System.out.println(numberOperations + " - Is " + n + " greater than 5?"); | |
numberOperations++; | |
return n > 5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment