title: Shuffled card deck. Dealing 5 cards to 4 players
body: <p>I have this shuffled card deck and I'm supposed to make it so that it hands out 5 cards to four players. I've been sitting here like an idiot for hours and I'm stuck.</p>
  
  <pre><code>public class Deck {
  public static void main(String[] args) 
  {
      String[] SUITS = {
          "Clubs", "Diamonds", "Hearts", "Spades"
      };
  
      String[] RANKS = {
          "2", "3", "4", "5", "6", "7", "8", "9", "10",
          "Jack", "Queen", "King", "Ace"
      };
  
      // initialize deck
      int n = SUITS.length * RANKS.length;
      String[] deck = new String[n];
      for (int i = 0; i &lt; RANKS.length; i++) {
          for (int j = 0; j &lt; SUITS.length; j++) {
              deck[SUITS.length*i + j] = RANKS[i] + " of " + SUITS[j];
          }
      }
  
      // shuffle
      for (int i = 0; i &lt; n; i++) {
          int r = i + (int) (Math.random() * (n-i));
          String temp = deck[r];
          deck[r] = deck[i];
          deck[i] = temp;
      }
    // print shuffled deck
      for (int i = 0; i &lt; 4; i++) {
          for (int j = 0; j &lt; 5; j++)
          System.out.println(deck[i])
      }
  }
  </code></pre>
  
  <p>I am stuck on that last part. I am getting five similar cards for four players.
  It looks like this:</p>
  
  <ul>
  <li>Queen of Hearts </li>
  <li>Queen of Hearts</li>
  <li>Queen of Hearts </li>
  <li>Queen of Hearts</li>
  <li>Queen of Hearts</li>
  <li>10 of Diamonds</li>
  <li>10 of Diamonds</li>
  <li>10 of Diamonds</li>
  <li>10 of Diamonds</li>
  <li>10 of Diamonds</li>
  <li>6 of Hearts</li>
  <li>6 of Hearts</li>
  <li>6 of Hearts</li>
  <li>6 of Hearts</li>
  <li>6 of Hearts</li>
  <li>10 of Spades</li>
  <li>10 of Spades</li>
  <li>10 of Spades</li>
  <li>10 of Spades</li>
  <li>10 of Spades</li>
  </ul>
  
  <p>How am I supposed to go at it if my intent is to deal five different cards to four players?</p>
  
  <p>I'm coding in Java, doing arrays and I can't use any java utils.</p>