Beginner number guessing game
There's no point in writing a separate class just to contain the main() function.  I'd rather invoke java GuessingGame than java Main.

while (GuessingGame.play) is bad in several ways:


GuessingGame exposes a public variable.  It's standard practice to require Main to call a method, so that no other class can write to a variable in the GuessingGame class.
The method GuessingGame.play() and the variable GuessingGame.play are too similarly named, which is confusing.
GuessingGame.play() sets the GuessingGame.play flag as a side-effect, which is unconventional and unintuitive.  It also violates the Single Responsibility Principle: play() should do one thing only.
A do-while loop might be more appropriate, since you want to play at least one game.


In GuessingGame, everything is static.  The number and guess variables could easily be made into local variables in play(), and therefore they should be.

Since the Random object is a class variable, there is no point in passing it as a parameter to nextInt().  There is a bug in nextInt(), in that it will never generate a 10.

Suggested solution

import java.util.Random;
import java.util.Scanner;

public class GuessingGame {

    private static Random random = new Random();
    private static Scanner scanner = new Scanner(System.in);

    /**
     * Picks a number uniformly between lowerBound (inclusive)
     * and upperBound (exclusive).
     */
    private static int nextInt(int lowerBound, int upperBound) {
        return lowerBound + random.nextInt(upperBound - lowerBound);
    }

    /**
     * Plays one game.
     *
     * @return true if the guess was correct
     */
    public static boolean play() {
        int number = nextInt(1, 10 + 1);
        System.out.println("Insert your guess from 1-10!");
        if (scanner.nextInt() == number) {
            System.out.println("Correct!");
            return true;
        } else {
            System.out.println("Wrong! The number is: " + number);
            return false;
        }
    }

    /**
     * Asks if the user wants to play again.
     */
    public static boolean shouldPlayAgain() {
        System.out.print("Do you want to try again? Y/N ");
        return "Y".equalsIgnoreCase(scanner.next());
    }

    /**
     * Plays guessing games until the user guesses correctly or gives up.
     */
    public static void main(String[] args) {
        while (!play() &amp;&amp; shouldPlayAgain());
    }
}