title: Could not find or load main class in java animal guessing game
body: <p>I keep getting this error message </p>
  
  <blockquote>
    <p>Error: Could not find or load main class Animals.Animals
    Java Result: 1</p>
  </blockquote>
  
  <p>I don't think I did anything wrong to my program. I can't even find where I did something wrong. Here's my program:</p>
  
  <pre><code>package Animals;
  
  import java.util.*;
  public class Animals {
  
    private static final Scanner keyboard = new Scanner(System.in);
  
  public static void introduction() {
      System.out.println("WELCOME TO GUESS THE ANIMAL GAME");
      System.out.println("If I am correct press Y and if I am wrong press N");
      System.out.println("Ready? Let's begin!");
      System.out.println("-------------------------------------------------");
  }
  
  public static void letsPlay(AnimalNode&lt;String&gt; latest) {
      while (!latest.correct()) {
          if (query(latest.getAnimal())) {
              latest = latest.getleft();
          } else {
              latest = latest.getright();
          }
      }
      System.out.println("Is it a " + latest.getAnimal());
      if (!query("\nY or N?")) {
          question(latest);
      } else {
          System.out.println("Winner!");
      }
  }
  
  public static AnimalNode&lt;String&gt; AnimalTree() {
      AnimalNode&lt;String&gt; root;
      AnimalNode&lt;String&gt; child;
      final String rootQuestion = "dog";
      final String animal = "dog";
  
      root = new AnimalNode&lt;String&gt;(rootQuestion, null, null);
      return root;
  }
  
  public static void question(AnimalNode&lt;String&gt; latest) {
      String setAnimal;
      String correctAnimal;
      String characteristic;
  
      setAnimal = latest.getAnimal();
      System.out.println("What is the correct answer? ");
      correctAnimal = keyboard.nextLine();
  
      System.out.println("What's a characteristic of " + correctAnimal
              + " that is different from " + setAnimal);
      characteristic = keyboard.nextLine();
  
      latest.setAnimal(characteristic);
      System.out.println("A " + correctAnimal + characteristic);
      if (query("Correct?")) {
          latest.setLeft(new AnimalNode&lt;String&gt;(correctAnimal, null, null));
          latest.setRight(new AnimalNode&lt;String&gt;(correctAnimal, null, null));
  
      }
  }
  
  public static boolean query(String ask) {
      String answer;
      System.out.println(ask + "Y or N: ");
      answer = keyboard.nextLine().toLowerCase();
      while (!answer.startsWith("y") &amp;&amp; !answer.startsWith("n")) {
          System.out.println("Press the correct letter");
          System.out.println("Let's try again");
      }
      return answer.startsWith("y");
  }
  
  public static void main(String[] args) {
      AnimalNode&lt;String&gt; root;
      introduction();
      root = AnimalTree();
  
      do {
          letsPlay(root);
      } while (query("-------------------------------------------------"
              + "\nPlay again?"));
  }
  
  }
  </code></pre>