title: NullPointerException in main method?
body: <pre><code> if(tempCard.getSuitValue() == PlayingCard.CLUBS || tempCard.getSuitValue() == PlayingCard.SPADES)
  </code></pre>
  
  <p>this is the line that is giving me a NullPointerException  </p>
  
  <pre><code>PlayingCard redCard, blackCard, tempCard; 
  </code></pre>
  
  <p>tempCard is declared as a varible of object PlayingCard</p>
  
  <pre><code>public PlayingCard(int newFace, int newSuit)
  {
      faceValue = newFace; 
      suitValue = newSuit; 
  }
  </code></pre>
  
  <p>this is the constructor for object PlayingCard, as well as the parameters for it</p>
  
  <pre><code>public int getFaceValue()
  {
      return faceValue;
  }
  public int getSuitValue()
  {
      return suitValue; 
  }
  </code></pre>
  
  <p>these methods give values to the getSuitValue method used in the statement at the very top</p>
  
  <pre><code>public final static int CLUBS = 0;
  public final static int DIAMONDS = 1;
  public final static int HEARTS = 2; 
  public final static int SPADES = 3;
  </code></pre>
  
  <p>these are the constant values for the cards in the deck.  </p>
  
  <p>I have gone through every method and constructor that is used in the line that results in the NullPointerException.  If anyone wants to see all 4 classes, I can post them at their request.  </p>