commutateur Java 14

switch (event) {
case PLAY -> {
System.out.println("PLAY event!");
counter++;
}
case STOP -> System.out.println("STOP event");
default -> System.out.println("Unknown event");
};
chfle