title: How to display a certain string for an integer?
body: <p>I have to make a Poker Dice game for class. I am able to successfully random five numbers 1 to 6 (to resemble rolling a die five times). However, I need to show "Nine" for 1, "Ten" for two, etc. I am using an array to hold the numbers. I can't seem to figure out how to assign a string output for each int. </p>
  
  <pre><code>public static void main(String[] args) {
  
      int[] player = new int[5];
      String[] cards = new String[] {"Nine", "Ten", "Jack", "Queen", "King", "Ace"};
  
      System.out.println("User: " + playerHand(player, cards));
  
  }
  public static String playerHand(int[] player, String[] cards) {
      String hand = "";
      for (int i = 0; i &lt; player.length; i++) {
          player[i] = (int) (Math.random() * (6 - 1) + 1);
          hand += player[i] + " ";
      }
  
      return hand;
      }
  </code></pre>