blob: 8c8b3fb4fcb8abce23f5c1ba7d1dec486fcc6914 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.util.logging.Logger;
public class InputLambda13 {
private static final Logger LOG = Logger.getLogger(InputLambda13.class.getName());
public static void testVoidLambda(TestOfVoidLambdas test) {
LOG.info("Method called");
test.doSmth("fef", 5);
}
public static void main(String[] args) {
testVoidLambda((String s1, Integer i2) -> {
LOG.info(s1);
});
}
private interface TestOfVoidLambdas {
public void doSmth(String first, Integer second);
}
}
|