mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
introduce functional variable (IDEA-141244)
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
import java.util.function.Supplier;
|
||||
|
||||
class Test {
|
||||
void foo() {
|
||||
if (true) {
|
||||
Supplier<String> stringSupplier = new Supplier<String>() {
|
||||
public String get() {
|
||||
return "Hello, world";
|
||||
}
|
||||
};
|
||||
System.out.println(stringSupplier.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user