introduce functional variable (IDEA-141244)

This commit is contained in:
Anna Kozlova
2017-06-05 11:27:43 +03:00
parent e1ae657059
commit 5d9e95ad5d
24 changed files with 683 additions and 69 deletions
@@ -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());
}
}
}