title: How can I declare the suits Diamond and Hearts?
body: <p>Okay in the code below I want to declare that "Diamonds" and "Hearts" are red.</p>
  
  <p>Code Here</p>
  
  <pre><code>if (card.getCardFace() == || card.getCardFace() == )
              g.setColor(Color.red);
           else
             g.setColor(Color.black);
  </code></pre>
  
  <p>I was wondering on how I could do that if I declared them as chars in my Card class. Do I have to change that ?</p>
  
  <p><strong>Card</strong> Class</p>
  
  <pre><code>// Instance Data - all things common to all cards
  private String cardFace; // king, q, j, 10 - 2, A
  private int faceValue; // numberic value of the card
  private char cardSuit; // hold suit of the card
  private char suits[] = {(char)(003), (char)(004), (char)(005), (char)(006)};
  
  // Constructor
  public PlayingCard(int value, int suit)
  {
      faceValue = value;
      setFace();
      setSuit(suit);
  }
  
  // helper setFace()
  public void setFace()
  {
      switch(faceValue)
      {
          case 1:
              cardFace = "A";
              faceValue = 14;
              break;
          case 11:
              cardFace = "J";
              break;
          case 12:
              cardFace = "Q";
              break;
          case 0:
              cardFace = "K";
              faceValue = 13;
              break;
          default:
              cardFace = ("" + faceValue);
      }
  }
  
  public void setSuit(int suit) // suit num between 0 and 3
  {
      cardSuit = suits[suit];
  }
  
  // other helpers
  public int getFaceValue()
  {
      return faceValue;
  }
  public String getCardFace()
  {
      return cardFace;
  }
  
  public String toString()
  {
      return (cardFace + cardSuit);
  }
  }
  </code></pre>
  
  <p>(Also let me know if you need more code)</p>