MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

functional/MethodConversion.java:17–26  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

15 System.out.println("someOtherName()");
16 }
17 public static void main(String[] args) {
18 BiConsumer<In1,In2> bic;
19
20 bic = MethodConversion::accept;
21 bic.accept(new In1(), new In2());
22
23 bic = MethodConversion::someOtherName;
24 // bic.someOtherName(new In1(), new In2()); // Nope
25 bic.accept(new In1(), new In2());
26 }
27}
28/* Output:
29accept()

Callers

nothing calls this directly

Calls 1

acceptMethod · 0.65

Tested by

no test coverage detected