title: "Insert AssignmentOperator expression" error JAVA
body: <p>I keep getting the error "Insert AssignmentOperator expression to complete expression" My program is to basically choose a random location that an animal is in. I am writing the arrary and variables right also, right??? </p>
  
  <p>The problem occurs in the if statement; the specific code is giraffeLocation [r.nextInt(giraffeLocation.length)];</p>
  
  <pre><code>import java.util.Scanner;
  import java.util.Random;
  
  public class animaltracker {
      public static void main(String[] args){
              Scanner s = new Scanner(System.in);
              Random r = new Random();
  
              char giraffe;
              char rhino;
              char hipopotamus;
  
              String[] giraffeLocation;
              giraffeLocation = new String[3];
              giraffeLocation[0] = ("Africa");
              giraffeLocation[1] = ("Russia");
              giraffeLocation[2] = ("Germany");
  
  
  
  
  
              System.out.println("Welcome to the animal tracker!");
              try { Thread.currentThread().sleep(800); }
              catch ( Exception e ) { }
  
              System.out.println("Which animal shall we be tracking today?");
              try { Thread.currentThread().sleep(800); }
              catch (Exception e) { }
  
              System.out.println("\nGiraffe?\nRhino?\nHipopotamus?");
              String animal = s.nextLine();
                  if(animal.equalsIgnoreCase("giraffe")){
                       **giraffeLocation [r.nextInt(giraffeLocation.length)];**
  
                      System.out.println("Your giraffe is in, " + giraffeLocation );
                  }
  
  
  
  
  
  
  
          }
      }
  </code></pre>