// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
public class SE13 {
    public enum Suits { CLUBS, SPADES, HEARTS, DIAMONDS }
    public static void test(Suits s) {
        int val = switch(s) {
            case CLUBS:
                System.out.println("Black");
        yield 1;
            case SPADES:
                System.out.println("Black");
        yield 4;
            case HEARTS:
                System.out.println("Red");
                yield 3;
            case DIAMONDS:
                System.out.println("Red");
                yield 2;
        };
        System.out.println(val);
    }
    public static void main(String[] args) {
        test(Suits.SPADES);
    }
}
