// "Replace lambda with method reference" "true-preview" import java.util.function.Function; class Test { class Bar { void f( ){ Function.Bar, String> r = Bar::foo; } private String foo() {} } }