blob: 1301cf9ab33221baf3cd27a65211f82cc98a65a3 (
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
|
//Compilable with Java8
package com.puppycrawl.tools.checkstyle.grammars.java8;
import java.util.logging.Logger;
public class InputLambda12 {
private static final Logger LOG = Logger.getLogger(InputLambda12.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);
}
}
|