Deitel Java exercise 6.30: Number-guessing game
Guess Guess = new Guess();


Java's naming convention for variables are in camelCase, so I will suggest writing that as Guess guess = new Guess();.

With that said, the fact that Java being an OOP language doesn't mean that everything must be done object-style. For this relatively trivial exercise, all you need is just a random number:

int randomNumber = getRandomNumber();


And everything can be done within the main() method itself:

public static void main(String[] args) {
    int randomNumber = getRandomNumber();
    try (Scanner scanner = new Scanner(System.in)) {
        for (int guess = prompt(scanner); guess != randomNumber; guess = prompt(scanner)) {
            System.out.println("too " + (guess &lt; randomNumber ? "low" : "high"));
        }
        System.out.println("Congratulations, you win!");
    }
}


I will suggest using try-with-resources on the Scanner instance to handle its underlying I/O resources efficiently. Instead of a 'plain' while loop, I opted to showcase how a similar loop can be done using the for-loop construct: it is somewhat more expressive, and the slight benefit is that it nicely scopes the guess variable within itself.

The implementation for getRandomNumber() and prompt(Scanner) shall be left for the reader... What I can further advise for the latter is that it should safely handle invalid inputs internally and only returns an int value for comparison.

Oh, and one more thing... you current implementation for the random number does not generate it in the range \$[1 ... 1000]\$, assuming that you really intend the range to be bound-inclusive:

(int) (Math.random() * 999 + 1)


Tip: Math.random() will not give you exactly 1.0. In addition the cast to int truncates the precision, so a value like 999.999 is rounded down to 999. You'll need an alternative way of getting 1000. :)