blob: 42807acc099204f95c56514747a0a4e11b8e24b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package com.jsyn.research.lambdas;
import java.util.function.BinaryOperator;
public class LambdaUnits {
public static void main(String[] args) {
test();
}
void tryLambda(BinaryOperator<Double> op) {
double result = op.apply(3.0, 4.0);
System.out.println("result = " + result);
}
private static void test() {
System.out.println("Test Lambdas");
// Need Java 8! tryLambda((x, y) -> (x * y));
}
}
|