2023-08-17 12:23:19 +00:00
|
|
|
import java.lang.Integer;
|
|
|
|
import java.lang.String;
|
|
|
|
import java.lang.Object;
|
|
|
|
|
|
|
|
public class SwitchString {
|
2024-03-14 12:50:56 +00:00
|
|
|
public main(o) {
|
2023-08-17 12:23:19 +00:00
|
|
|
return switch (o) {
|
|
|
|
case "AaAaAa" -> 1; // These two have the same hash code!
|
|
|
|
case "AaAaBB" -> 2;
|
|
|
|
case "test", "TEST" -> 3;
|
|
|
|
default -> 4;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|