Created
November 1, 2016 13:30
-
-
Save sebastianfrelle/6b8295e3faf27d5602a2c30cf97e4823 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
class LambdaTester { | |
interface MathOperation { | |
int operation(int a, int b); | |
} | |
public static void main(String[] args) { | |
System.out.println(testLambda( | |
2, | |
3, | |
(a, b) -> a + b | |
)); | |
} | |
public static int testLambda(int a, int b, MathOperation op) { | |
return op.operation(a, b); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment