JAVA · CONSOLE GAME · DECODELABS 2026

Guess the
Number.
Beat the Game.

A fun, interactive number guessing game built in Java. The computer picks a secret number — your job is to find it using hints. Built as part of the DecodeLabs Industrial Training Kit (Batch 2026).

NumberGame.java — console output
╔══════════════════════════════╗
║ Number Guessing Game 🎮 ║
╚══════════════════════════════╝

I've picked a number between 1 and 100.
Can you guess it?

Enter your guess: 50
↓ Too low! Try higher.
Enter your guess: 75
↓ Too high! Try lower.
Enter your guess: 63
🎉 Correct! You got it in 3 attempts!

Play again? (y/n):
100
Number Range
Replayable
Java
Language
// Features
🎯
Smart hints
After each guess, the game tells you whether to go higher or lower — guiding you to the answer.
🔁
Replay anytime
Once you win, you can instantly start a new round with a freshly randomized number.
📊
Attempt tracking
The game tracks how many guesses it took you — challenge yourself to beat your best score!
Pure Java
No frameworks, no dependencies. Just clean Java using Scanner and basic OOP — great for learning.
01
Clone the repository
Run git clone https://github.com/icreativez-AishaAli/-Number-Game---Java-Console-Game.git in your terminal.
02
Open in your IDE
Open the project folder in VS Code, IntelliJ IDEA, or Eclipse. Make sure you have Java JDK 8+ installed.
03
Compile the code
In your terminal, run javac NumberGame.java to compile the source file.
04
Play the game!
Run java NumberGame and start guessing. Good luck! 🎉