title: Can't call a method from another class JAVA
body: <p>I'm making a number guessing program. A random number is generated, and the user tries to guess it. The program will print "too high" or "too low" and let the user guess again. I'm having an issue inputing guesses after the first one into the method that takes the guess.</p>
  
  <p>Here is my class:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Lab8
  {
      public static void main (String [] args)
      {
          Scanner in = new Scanner(System.in);
  
          System.out.println("Enter a number: ");
          MyNumberGuess MyNumberGuess = new MyNumberGuess(in.nextInt());
  
          while (MyNumberGuess.tooLow() == true || MyNumberGuess.tooHigh() == true)
          {
  
              if (MyNumberGuess.tooHigh() == true)
              {
                  System.out.println("Too high");
                  System.out.println("Enter a number: ");
                  MyNumberGuess.MyNumberGuess(in.nextInt());
              }
              else if (MyNumberGuess.tooLow() == true)
              {
                  System.out.println("Too low");
                  System.out.println("Enter a number: ");
                  MyNumberGuess.MyNumberGuess(in.nextInt());
              }
          }
  
          System.out.println("Correct");
          System.out.println("You made " + MyNumberGuess.getNumGuesses() + " guesses");
      }
  }
  </code></pre>
  
  <p>Here's the other class, and the problem method:</p>
  
  <pre><code>import java.util.*;
  
  public class MyNumberGuess
  {
      public static final int MAX_GUESS = 1000; 
  
      private int theNumber, numGuesses, prevGuess;
  
      public MyNumberGuess(int inGuess)
      {
         Random generator = new Random(); 
         numGuesses = 1;
         prevGuess = inGuess;
         theNumber = generator.nextInt(MAX_GUESS);
      }
  }
  </code></pre>
  
  <p>As is, I'm getting a "cannot find symbol" error when compiling in my first class on this line:</p>
  
  <pre><code>MyNumberGuess.MyNumberGuess(in.nextInt());
  </code></pre>
  
  <p>I've tried calling it in different ways, using parameters and not, and trying to call the variables alone, thought they are supposed to be private. Any help is appreciated.</p>