Files
2022-10-06 15:55:11 +00:00

11 lines
268 B
Java

// "Make 'x' effectively final by moving initializer to the 'if' statement" "true-preview"
class X {
void test(boolean a, int b, int c) {
int x = b * c;
int y = b / c;
if (a) {
x = 1;
}
Runnable r = () -> System.out.println(<caret>x);
}
}