mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-25 02:21:17 +07:00
11 lines
269 B
Java
11 lines
269 B
Java
// "Bring 'String msg' into scope" "true-preview"
|
|
public class BringVarIntoScope {
|
|
public void moveVariableDeclarationOutOfBlock(boolean b) {
|
|
String msg;
|
|
if (b) {
|
|
msg = "Leap year";
|
|
} else {
|
|
msg = "Not a leap year";
|
|
}
|
|
}
|
|
} |