title: String variable may not have been initialized (error diects to line 34)
body: <p>I've been trying to get the string initialize, but to no avail.  I have tried all of the solutions I have come across and I am not sure whether it is because of my ineptness or because I need a new solution I already have the logic of the program worked out, so I just need help trying to initialize the string value.  If anyone could help, I would be much obliged!  </p>
  
  <p>P.S  Curse me for wanting a challenge and using srings.  -_-</p>
  
  <pre><code>import java.util.Scanner;
  import java.util.Random;
  
  public class RockPaperScissors
  {
  public static void main (String[] args)
  {
      String player, computer;
      int answer;
      Scanner scan = new Scanner (System.in);
  
      Random generator = new Random();
      answer = generator.nextInt(3) + 1;
  
      if (answer &lt; 1 || answer &gt; 3)
              answer = generator.nextInt(3) + 1;
  
      if (answer == 1)
          computer = "rock";
      if (answer == 2)
          computer = "paper";
      if (answer == 3)
          computer = "scissors";
  
      System.out.println ("Please choose rock, paper, or scissors.");
      player = scan.nextLine();
  
      if (!player.equalsIgnoreCase("rock") || !player.equalsIgnoreCase("paper") 
              || !player.equalsIgnoreCase("scissors"))
      {
          System.out.println ("Please correctly enter one of the three 
                      choices: rock, paper, and scissors.");
          player = scan.nextLine();
      }
  
      if (player.compareTo(computer) == 0)
          System.out.println ("It's a draw!  You both chose " + player + 
                      "!");
  
      if ((computer.equalsIgnoreCase("rock") &amp;&amp;  
              player.equalsIgnoreCase("scissors")) &amp;&amp; 
              (computer.equalsIgnoreCase("scissors") &amp;&amp; player.equalsIgnoreCase("paper")) 
              &amp;&amp; (computer.equalsIgnoreCase("paper") &amp;&amp; player.equalsIgnoreCase("rock")))
          System.out.println ("You lost!  The computer chose " + computer + " 
                      and you chose " + player + ".");
  
      if ((player.equalsIgnoreCase("rock") &amp;&amp;  
              computer.equalsIgnoreCase("scissors")) &amp;&amp; 
              (player.equalsIgnoreCase("scissors") &amp;&amp; 
              computer.equalsIgnoreCase("paper")) &amp;&amp; 
              (player.equalsIgnoreCase("paper") &amp;&amp;     
              computer.equalsIgnoreCase("rock")))
              System.out.println ("You won!  CONGRATULATIONS!  The computer chose             
                      " + computer + " and you chose " + player + ".");
  
  }
  </code></pre>
  
  <p>}</p>