title: Print random key followed by specific value?
body: <p>I'm pretty new to Java and in an effort to learn more I'm trying to make a game whereby you're given a random lyric from a song, and then the song title and artist. </p>
  
  <p>This would be pretty easy, however I wanted the lyric to be random, and then print the artist and song title using a seperate method. My problem is that I'm not sure how to go from printing one random string to printing a specific answer.</p>
  
  <p>I currently have the lyrics and the answers in a hashmap with the lyrics as keys and answers as values, and can print random keys by turning them into an arraylist using this method</p>
  
  <pre><code>public void randomLyrics()
      {
          ArrayList&lt;String&gt; lyricKey = new ArrayList&lt;String&gt;(lyrics.keySet());
          if(lyrics.size() &gt; 0) {
              Random rand = new Random();
              int index = rand.nextInt(lyrics.size());
              System.out.println(lyricKey.get(rand.nextInt(lyrics.size())));
          }
      }
  </code></pre>
  
  <p>however I'm pretty sure that this isn't the right way to go about it, and am not sure how I would go about printing the answers seperately. </p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Also just to clarify, I want to call a method (randomLyrics) which will display a random lyric such as "that's me in the corner, that's me in the spotlight" and then call a seperate method (answer) which would then print "Losing My Religion - R.E.M." </p>
  
  <p>Many thanks</p>