mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-28 06:08:20 +07:00
d9193529e2
GitOrigin-RevId: e6f1c6e2d80af6332bae642391ca4b6113aa12ed
18 lines
475 B
Java
18 lines
475 B
Java
// "Make 'x' effectively final by moving initializer to the 'if' statement" "false"
|
|
class X {
|
|
void test(boolean a, boolean b, boolean c, boolean d) {
|
|
int x = 0;
|
|
if (a) {
|
|
System.out.println("hello");
|
|
} else if (b) {
|
|
System.out.println("hello2");
|
|
} else if (c) {
|
|
System.out.println("hello3");
|
|
} else if (d) {
|
|
System.out.println("hello4");
|
|
} else {
|
|
x = 1;
|
|
}
|
|
Runnable r = () -> System.out.println(<caret>x);
|
|
}
|
|
} |