import com.example.*; class X { void test(MyFunction fn) {} void use() { test(() -> {}); test(System.out::println); } void unknownMethod() { Util.foo(x -> x == 5 ? 1 : 2); } }