how to add numbers that are in an array so a highscore could be output
<p>I need to find the sum of the ranks from 13 cards that a user is dealt.</p>

<p>this is in my class
card.java
which returns the value of the card as a string then the suit as a string and then the rank as an int.</p>

<pre><code>public  String toString(){

String s = ("I am the " + rankString[rank-2] + " of " + suit + "(rank): " + rank);

    return  s;

}
</code></pre>

<p>this is in my CardFrame class.
CardFrame.java</p>

<pre><code>private void doButton1Stuff(){
    //textArea.append("\nButton 1 Clicked");
    textArea.setText("");
    for(int i = 0; i&lt;13; i++){
    textArea.append(deck.getNextCard().toString()+"\n");
    }
</code></pre>

<p>everything is working fine i just need to figure out a way to add all the ranks together from the 13 cards the user is dealt and output that as their score. </p>

<pre><code>public Card getNextCard(){
    //check for end of deck
        topCard++;
        if(topCard==53){
        topCard = 1;
        shuffle();
        }


    return cards[deck[topCard-1]];
</code></pre>
