mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
16 lines
312 B
Java
16 lines
312 B
Java
// "Replace with 'switch' expression" "true"
|
|
import java.util.*;
|
|
|
|
class SwitchExpressionMigration {
|
|
private static void m() {
|
|
String s = "foo";
|
|
int x = 5;
|
|
System.out.println(s);
|
|
|
|
s = switch (x) {
|
|
case 1 -> "bar";
|
|
case 2 -> "baz";
|
|
default -> "zuq";
|
|
};
|
|
}
|
|
} |