Skip to content

Instantly share code, notes, and snippets.

@sebastianfrelle
Created November 1, 2016 13:30
Show Gist options
  • Save sebastianfrelle/6b8295e3faf27d5602a2c30cf97e4823 to your computer and use it in GitHub Desktop.
Save sebastianfrelle/6b8295e3faf27d5602a2c30cf97e4823 to your computer and use it in GitHub Desktop.
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