Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CardsApp {
- public static void main () {
- Cards[] deck = new Cards[52];
- int cardCount = 0;
- createCards("Hearts");
- createCards("Diamonds");
- createCards("Spades");
- createCards("Clubs");
- }
- public static void createCards (String suit) {
- for (int count = 1; count <= 13; count++) {
- deck[cardCount] = new Cards (suit, Integer.toString(count));
- cardCount++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement