Files
2023-07-14 16:14:45 +00:00

14 lines
321 B
Java

// "Replace 'switch' with 'if'" "true-preview"
import org.jetbrains.annotations.NotNull;
class Test {
void foo(@NotNull Object o) {
switch<caret> (o) {
case String s -> System.out.println("one");
case Integer i -> System.out.println("two");
default -> System.out.println("default");
}
}
}