import java.util.function.Supplier; public class Test { { Supplier sup = new Test()::get; } private String get() { return null; } }