15 lines
303 B
Plaintext
15 lines
303 B
Plaintext
|
import java.lang.Integer;
|
||
|
import java.util.function.Function;
|
||
|
|
||
|
public class FunctionalInterface {
|
||
|
Integer accept(Function<Integer, Integer> f) {
|
||
|
return f.apply(20);
|
||
|
}
|
||
|
|
||
|
public Integer m() {
|
||
|
var v = accept(i -> {
|
||
|
return i * 10;
|
||
|
});
|
||
|
return v;
|
||
|
}
|
||
|
}
|