title: How to create an arraylist with enums
body: <p>I have one class:</p>
  
  <pre><code>package business;
  
  public class Card {
      public enum Suit{SPADE, CLUB, HEART, DIAMOND};
      public enum Rank{JACK, KING, SEVEN, EIGHT, NINE, TEN, ACE, QUEEN}
  
      private String Suit;
      private String Rank;
  
      public Card(String suit, String rank) {
          this.Suit = suit;
          this.Rank = rank;
      }
  
      public String getRank() {
          return Rank;
      }
  
      public String getSuit() {
          return Suit;
      }
  
      @Override
      public String toString() {
          return getRank() + " of " + getSuit();
      }
  }
  </code></pre>
  
  <p>And I have another class:</p>
  
  <pre><code>package data;
  
  import business.Hand;
  import business.Card;
  import java.util.ArrayList;
  import java.util.Collections;
  
  public class Deck {
  
      ArrayList&lt;Card&gt; deck = new ArrayList&lt;Card&gt;();
  
      public ArrayList&lt;Card&gt; get32Cards() {
  
          **deck.add(new Card("Spades", "Jack"));**
  
          Collections.shuffle(deck); //this shuffles the deck
  
          return deck;
      }
  }
  </code></pre>
  
  <p>How do I add an element to an <code>ArrayList</code> so that it looks like the one in bold?
  I previously just made them strings, which is why there is 'private string suit' and 'private string rank' there.</p>
  
  <p>They are also in separate packages, business, and data</p>