int x = 1;
Consumer<Object> f = (i) -> {
int x = 1; // invalid
};
vs.
Consumer<Object> f = (i) -> {
int x = 1;
};
int x = 1; // valid
Imagine those two blocks inside a method. Why is the second block valid?