8 Testing for an enum constant 8 public enum Suit {Clubs, Diamonds, Hearts, Spades} Suit s= Suit.Clubs; Then s == Suit.Clubs is true s == Suit.Hearts is false switch(s) { case Clubs: case Spades: color= black; break; case Diamonds: case Hearts: color= red; break; } Can use a switch statement Type of s is Suit.
{}