14 lines
315 B
Plaintext
14 lines
315 B
Plaintext
|
import java.lang.Integer;
|
||
|
import java.lang.String;
|
||
|
import java.lang.Object;
|
||
|
|
||
|
public class SwitchString {
|
||
|
main(o) {
|
||
|
return switch (o) {
|
||
|
case "AaAaAa" -> 1; // These two have the same hash code!
|
||
|
case "AaAaBB" -> 2;
|
||
|
case "test", "TEST" -> 3;
|
||
|
default -> 4;
|
||
|
};
|
||
|
}
|
||
|
}
|