A simple console-based number guessing game built using Java.
- Random number generation (1–100)
- Unlimited guesses
- Input validation
- Attempt counter
- Exit anytime using -1
- Beginner-friendly Java project
- Java
- Scanner
- Math.random()
src/
└── Main.java
- Clone the repository
git clone https://github.com/your-username/Java-Guess-The-Number.git-
Open the project in your favorite Java IDE.
-
Compile and run:
javac Main.java
java MainGuess The Number Game
Guess a number between 1 and 100
Enter your guess: 50
Too high!
Enter your guess: 25
Too low!
Enter your guess: 36
Congratulations!
You guessed the correct number.
Attempts: 3
- Difficulty levels
- Scoreboard
- Timer
- High score system
- Multiple rounds
- Play Again option
Shahmeer Rana