public String getTwoPair()
    {
        String stt = "0";

        //same implementation idea as in isOnePair method.
        //this time, when a pair is found, a second pair must be found too.

        if (cards[0].getRank() == cards[1].getRank()) {
            if (cards[2].getRank() == cards[3].getRank()) {
                stt = Character.toString(cards[0].getCharCard()) + cards[2].getCharCard() + cards[4].getCharCard();
                
                return stt;
            }
            
            if (cards[3].getRank() == cards[4].getRank()) {
                stt = Character.toString(cards[0].getCharCard()) + cards[3].getCharCard() + cards[2].getCharCard();
                
                return stt;
            }
        }
        
        if (cards[1].getRank() == cards[2].getRank()) {
            if (cards[3].getRank() == cards[4].getRank()) {
                stt = Character.toString(cards[1].getCharCard()) + cards[3].getCharCard() + cards[0].getCharCard();

                return stt;
            }
        }

        return stt;
    }