Why am I only getting NULL back?
<p>All I am getting back when I run the program is null...and I can't stare at this anymore. I just can't seem to find the error... Could someone just give a hint please... I don't know what other details are relevant.</p>

<pre><code> public class Deckofcards
   {
      public static final int NCARDS = 52;

      private card[] deckOfCards;         // Contains all 52 cards
      private int currentCard;            // deal THIS card in deck           

      public Deckofcards( )    // Constructor
      {
     deckOfCards = new card[ NCARDS ];

     int i = 0;

     for ( int suit = card.SPADE; suit &lt;= card.DIAMOND; suit++ )
        for ( int rank = 1; rank &lt;= 13; rank++ )
        deckOfCards[i++] = new card(suit, rank);

      private byte cardSuit;
      private byte cardRank;

      public card( int suit, int rank )
      {
     if ( rank == 1 )
        cardRank = 14;     // Give Ace the rank 14
     else
        cardRank = (byte) rank;

     cardSuit = (byte) suit;
      }

      public boolean equals( card x )
      {
     if ( this.cardSuit == x.cardSuit &amp;&amp;
          this.cardRank == x.cardRank    )
        return ( true ); 
     else         
        return ( false );
      }

      public String toString()
      {
     return ( Rank[ cardRank ] + Suit[ cardSuit ] );
      }
   }


    public class Dealer

   {
      public static void main(String[] args)
      {

     Deckofcards a;

     a = new Deckofcards();
     System.out.println(a);      // What a new deck look like     

     System.out.println("Shuffle cards....");            
     a.shuffle(1000);            // Shuffle deck of card "a"
     System.out.println(a);      // Deck after shuffling

     card b;

     b = a.deal();
     System.out.println("Deal a card: " + b);
     b = a.deal();
     System.out.println("Deal a card: " + b);
     b = a.deal();
     System.out.println("Deal a card: " + b);
     b = a.deal();
     System.out.println("Deal a card: " + b);
     b = a.deal();
     System.out.println("Deal a card: " + b);

      }
   }    
     currentCard = 0;
      }

       //shuffle(n): shuffle the deck

      public void shuffle(int n)
      {
     int i, j, k;

     for ( k = 0; k &lt; n; k++ )
     {
         i = (int) ( NCARDS * Math.random() );  // Pick 2 random cards
         j = (int) ( NCARDS * Math.random() );  // in the deck

        //swap these randomly picked cards

         card tmp = deckOfCards[i];
         deckOfCards[i] = deckOfCards[j];
         deckOfCards[j] = tmp;;
     }

     currentCard = 0;   // Reset current card to deal
      }

     //deal(): deal deckOfCards[currentCard] out

      public card deal()
      {
     if ( currentCard &lt; NCARDS )
     {
        return ( deckOfCards[ currentCard++ ] );
     }
     else
     {
        System.out.println("Out of cards error");
        return ( null );  // Error;
     }
      }

      public String toString()
      {
     String s = "";
     int k;

     k = 0;
     for ( int i = 0; i &lt; 4; i++ )
     {
        for ( int j = 1; j &lt;= 13; j++ )
        s += (deckOfCards[k++] + " ");

        s += "\n";
     }
     return ( s );
      }
   }


    public class card
   {
      public static final int SPADE   = 4;
      public static final int HEART   = 3;
      public static final int CLUB    = 2;
      public static final int DIAMOND = 1;

      private static final String[] Suit = { "*", "d", "c", "h", "s"};
      private static final String[] Rank = { "*", "1", "2", "3", "4",
               "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"};

      private byte cardSuit;
      private byte cardRank;

      public card( int suit, int rank )
      {
     if ( rank == 1 )
        cardRank = 14;     // Give Ace the rank 14
     else
        cardRank = (byte) rank;

     cardSuit = (byte) suit;
      }

      public boolean equals( card x )
      {
     if ( this.cardSuit == x.cardSuit &amp;&amp;
          this.cardRank == x.cardRank    )
        return ( true ); 
     else         
        return ( false );
      }

      public String toString()
      {
     return ( Rank[ cardRank ] + Suit[ cardSuit ] );
      }
   }


    public class Dealer

   {
      public static void main(String[] args)
      {

     Deckofcards a;

     a = new Deckofcards();
     System.out.println(a);      // What a new deck look like     

     System.out.println("Shuffle cards....");            
     a.shuffle(1000);            // Shuffle deck of card "a"
     System.out.println(a);      // Deck after shuffling

     card b;

     b = a.deal();
     System.out.println("Deal a card: " + b);
     b = a.deal();
     System.out.println("Deal a card: " + b);
     b = a.deal();
     System.out.println("Deal a card: " + b);
     b = a.deal();
     System.out.println("Deal a card: " + b);
     b = a.deal();
     System.out.println("Deal a card: " + b);

      }
   }
</code></pre>

<p>Here is what I am receiving.</p>

<pre><code>null null null null null null null null null null null null null 
</code></pre>

<p>null null null null null null null null null null null null null 
null null null null null null null null null null null null null 
null null null null null null null null null null null null null </p>

<p>Shuffle cards....
null null null null null null null null null null null null null 
null null null null null null null null null null null null null 
null null null null null null null null null null null null null 
null null null null null null null null null null null null null </p>

<p>Deal a card: null
Deal a card: null
Deal a card: null
Deal a card: null
Deal a card: null</p>