mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 20:07:01 +07:00
20 lines
344 B
Java
20 lines
344 B
Java
import java.util.function.Supplier;
|
|
|
|
class Test {
|
|
void bar() {
|
|
foo(new Supplier<String>() {
|
|
public String get() {
|
|
String s = "";
|
|
System.out.println(s);
|
|
return s;
|
|
}
|
|
});
|
|
}
|
|
|
|
void foo(Supplier<String> anObject) {
|
|
|
|
String s = anObject.get();
|
|
|
|
System.out.println(s);
|
|
}
|
|
} |