title: How to test my Deck class in Java
body: <p>I would like to print my ArrayList FullDeckArray to see if my Deck has all 52 cards and values.</p>
  
  <p>This is my Card and Deck Classes below</p>
  
  <pre><code>package blackjack;
  
  /**
   *
   * @author mvisser
   */
  public class Card 
  {
  
     private int rank;
     private int suit;
  
     public String tostring(Card card1)
     {
  
        String result = "";
  
        if (rank == 1) {
            result = "Ace";
        }
        if (rank == 2) {
            result = "Two";    
        }
        if (rank == 3) {
            result = "Three";
  
        }
        if (rank == 4) {
            result = "Four";   
        }
        if (rank == 5) {
            result = "Five";
  
        }
        if (rank == 6) {
            result = "Six";
  
        }
        if (rank == 7) {
            result = "Seven";
  
        }
        if (rank == 8) {
           result = "Eight";      
        }
        if (rank == 9) {
           result = "Nine";  
        }
        if (rank == 10) {
           result = "Ten";     
        }
        if (rank == 11) {
           result = "Jack";     
        }
        if (rank == 12) {
              result = "Queen";   
        }
        if (rank == 13) {
              result = "King";     
        }
        if (suit == 1) {
            result = result + " of Clubs ";
        }
        if (suit == 2) {
           result = result + " of Diamonds ";
        }
        if (suit == 3) {
            result = result + " of Hearts ";
        }
        if (suit == 4) {
            result = result + " of Spades ";
        }
  
        return result;
  
     }
  
     public Card(int rank, int suit) 
     {
          this.rank = rank;
          this.suit = suit;    
     }
  }
  </code></pre>
  
  <p>As you can see in my Deck Class I hava a ArrayList FullDeckArray and all I want to do is<br>
     print it out so see what value is bringing back</p>
  
  <pre><code>public class Deck 
  {
  //     private Card[][] fullDeck = new Card[0][0];
       private Random shuffle = new Random();
       public ArrayList&lt;Card&gt; FullDeckArray = new ArrayList&lt;Card&gt;();
  
  //     private int numberOfCards = 52;
  
     public Deck()
     {
  
  
      for (int rank = 1; rank &lt;= 13; rank++) {
  
              for (int suit = 1; suit &lt;= 4; suit++)
              {
                 FullDeckArray.add(new Card(rank, suit));
  
  
              }
          }
     }        
  
      public void shuffle() {
          Collections.shuffle(FullDeckArray);   
      }
  
      public Card DrawCard() {
          int cardPosition = shuffle.nextInt(FullDeckArray.size()+1);
          return FullDeckArray.remove(cardPosition);
      }
  
       public int TotalCards() {
              return FullDeckArray.size();
       }
  
       public void test() {
              System.out.println( ArrayList&lt;Card&gt;( FullDeckArray ) );
       }
  }
  </code></pre>