()
| 17 | } |
| 18 | |
| 19 | static void captureRecv() { |
| 20 | // method reference |
| 21 | A a = new A(); |
| 22 | Runnable r = a::noArg; |
| 23 | r.run(); |
| 24 | |
| 25 | // lambda expression |
| 26 | Args args = new Args(); |
| 27 | args.callOnThis(new B()); |
| 28 | } |
| 29 | |
| 30 | void callOnThis(B b) { |
| 31 | Runnable r = () -> consume(b); |
no test coverage detected