This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package enums; | |
enum CardTypes { | |
CLUBS, // ♣ | |
DIAMONDS,//♦ | |
HEARTS, //♥ | |
SPADES // ♠ | |
} | |
public class playingCards { | |
public static void main(String args[]){ | |
CardTypes myCard = CardTypes.CLUBS; | |
System.out.println("Your card is " + CardTypes.CLUBS); | |
} | |
} |
References
March/April 2016 | |
|
|
page 40 | Table of Contents |