1
2
3
4
5
6
7
8
9
10
11
12 package com.puppycrawl.tools.checkstyle.grammar.java8;
13
14 import java.util.logging.Logger;
15
16
17 public class InputLambda3 {
18
19 private static final Logger LOG = Logger.getLogger(InputLambda3.class.getName());
20
21 public static void testVoidLambda(TestOfVoidLambdas test) {
22 LOG.info("Method called");
23 test.doSmth();
24 }
25
26
27 public static void main(String[] args) {
28 testVoidLambda(() -> {
29 LOG.info("Method in interface called");
30 });
31 }
32
33 private interface TestOfVoidLambdas {
34
35 public void doSmth();
36 }
37 }