// "Replace with lambda" "true-preview" class Test { interface InOut { void run() throws IOException; static void foo(){} } InOut bind() { return new InOut() { @Override public void run() throws IOException { foo(); } }; } }