title: Getting cards in hand Java
body: <p>I am currently writing a modified version of Gin Rummy. My problem is I am new to arrays and I am trying to get each player to hold 5 random cards generated in my Card class. How do I make it so I can put 5 random cards into each players hand? Here is my Card class...</p>
  
  <pre><code>{  
  String suit;  
  String rank; 
  int score;
  int a;  
  int b;
  final int CARDS_IN_SUIT = 13;
  final int SUITS_IN_DECK = 4;
  public GinCard(String suit, String rank, int score, int a, int b){
      this.suit = "";
      this.rank = "";
      this.score = 0;
      this.a = 0;
      this.b = 0; 
  }
     //Sets up the cards(Suits and ranks)
  public GinCard(){           
      switch(a){
      case 1:
          suit = "Clubs";
          break;
      case 2:
          suit = "Diamonds";
          break;
      case 3:
          suit = "Hearts";
          break;
      default:
          suit = "Spades";
          break;
      }
      switch(b){
      case 1:
          rank = "Ace";
          break;
      case 2:
          rank ="2";
          break;
      case 3:
          rank ="3";
          break;
      case 4:
          rank ="4";
          break;
      case 5:
          rank ="5";
          break;
      case 6:
          rank ="6";
          break;  
      case 7:
          rank ="7";
          break;  
      case 8:
          rank ="8";
          break;
      case 9:
          rank ="9";
          break;
      case 10:
          rank ="10";
          break;
      case 11:
          rank = "Jack";
          break;
      case 12:
          rank = "Queen";
          break;
      case 13:
          rank = "King";
          break;
      default:
          break;
          }  
  
      switch(score){
      case 1:
          score = 15;
          break;
      case 2:
          score = 5;
          break;
      case 3:
          score = 5;
          break;
      case 4:
          score = 5;
          break;
      case 5:
          score = 5;
          break;
      case 6:
          score = 5;
          break;
      case 7:
          score = 5;
          break;
      case 8:
          score = 5;
          break;
      case 9:
          score = 5;
          break;
      case 10:
          score = 5;
          break;
      case 11:
          score = 10;
          break;
      case 12:
          score = 10;
          break;
      case 13:
          score = 10;
          break;
  
      }
  }
  //Returns the value of the rank
  int getRank(){    
      return b;  
  }
  //Returns the value of the suit in case of a draw in ranks
  int getSuit(){
      return a;   
  }  
  int getScore(){
      return score;
  }
  public void deal() 
  {
      a = ((int)(Math.random() * 100) % SUITS_IN_DECK + 1);  
      b = ((int)(Math.random() * 100) % CARDS_IN_SUIT + 1);  
  }
   } 
  </code></pre>
  
  <p>and here is my main program so far...</p>
  
  <pre><code>public class GinRummy {
  
  public static final int CARDS_IN_HAND = 5;
  
  public void RummyHand(){
      int[] hand = new int[CARDS_IN_HAND];
  
  };
  
  public static void main(String[] args) {
      // TODO Auto-generated method stub
      Scanner keyboard = new Scanner(System.in);
  
  
      GinCard player = new GinCard();
      GinCard player2 = new GinCard();
  </code></pre>