Consider the following program:
public class Main { public static void main(String[] args) { String[] cards = { "Club", "spade", " diamond ", "hearts" }; for (String card : cards) { switch (card) { case "Club": System.out.print(" club "); break; case "Spade": System.out.print(" spade "); break; case "diamond": System.out.print(" diamond "); break; case "heart": System.out.print(" heart "); break; default: System.out.print(" none "); }/* w w w . j a v a 2 s . c o m*/ } } }
Which one of the following options shows the output of this program?
b)
Here is the description of matches for the four enumeration values: