Deck of Cards issue -Java
<p>I am having problems getting this DeckOfCards class to compile. It keeps telling me that it cannot find the symbol when pointing to <code>Deck2.Shuffle()</code> and <code>Deck2.deal()</code>. Any ideas why?</p>

<pre><code>import java.lang.Math;
import java.util.Random;

public class DeckOfCards {
private Cards[] Deck;
private int cardHold;

public DeckOfCards() {
    Deck = new Cards[52];
    int n = 0;
    for (int i = 1; i &lt;= 13; i++) {
        for (int j = 1; j &lt;= 4; j++) {
            Deck[n] = new Cards(i, j);
            n = n + 1;
        }
    }
    cardHold = -1;
}

public void Shuffle() {
    // shuffles ands resets deck
    int i = 0;
    while (i &lt; 52) {
        int rando = (int) (5.0 * (Math.random()));
        Cards temp = Deck[rando];
        Deck[rando] = Deck[i];
        Deck[i] = temp;
        i++;
    }
}

public Cards deal() {
    // if there are any more cards left in the deck, return the next one and
    // increment
    // index; return null if all the cards have been dealt
    // ***Question, increment before or
    // after??***----------------------------------------
    if (!hasMoreCards()) {
        return null;
    } else {
        Cards temp = null;
        temp = Deck[cardHold];
        cardHold = cardHold + 1;
        return temp;
    }
}

public boolean hasMoreCards() {
    // returns true if there are more cards left, else return false
    if (cardHold == 0)
        return false;
    else
        return true;
}

public static void main(String[] args) {
    DeckOfCards Deck2 = new DeckOfCards();
    Deck2.Shuffle();
    for (int i = 0; i &lt; 52; i++)
        System.out.println(Deck2.deal());
}
}
</code></pre>

<p>Heres my Card class, maybe that is causing the issue?</p>

<pre><code>public class Cards {
protected int rank;
protected int suit;
protected String[] sNames = { "Hearts", "Clubs", "Spades", "Diamonds" };
protected String[] rNames = { "Ace", "2", "3", "4", "5", "6", "7", "8",
        "9", "10", "Jack", "Queen", "King" };

public Cards(int Rank, int Suit) {
    suit = Suit;
    rank = Rank;
}

public String toString() {
    return ("Your card is: " + rNames[rank - 1] + " of " + sNames[suit - 1]);
}

public int getRank() {
    return rank;
}

public int getSuit() {
    return suit;
}

}
</code></pre>
