A command-line quiz application that tests your knowledge of basic Java programming concepts. This interactive game features multiple-choice questions covering essential Java fundamentals.
- Features
- Prerequisites
- Installation
- How to Run
- Game Rules
- Topics Covered
- Sample Output
- Project Structure
- Contributing
- License
- 10 Multiple-Choice Questions covering Java fundamentals
- Real-time Feedback on correct and incorrect answers
- Score Tracking with percentage calculation
- Performance Rating based on your final score
- Input Validation to handle invalid user entries
- Clean Console Interface with formatted output
- Java Development Kit (JDK) 8 or higher
- A terminal/command prompt
- (Optional) IntelliJ IDEA or any Java IDE
- Clone this repository:
git clone https://github.com/yourusername/java-quiz-game.git- Navigate to the project directory:
cd java-quiz-game- Compile the Java file:
javac JavaQuizGame.java- Run the program:
java JavaQuizGame- Open the project in IntelliJ IDEA
- Right-click on
JavaQuizGame.java - Select "Run 'JavaQuizGame.main()'"
- The game presents 10 multiple-choice questions
- Each question has 4 options (numbered 1-4)
- Enter the number corresponding to your answer
- Receive immediate feedback on whether your answer is correct
- At the end, view your total score and performance rating
- 90-100%: 🏆 Excellent! You're a Java expert!
- 70-89%: 👍 Great job! You have a solid understanding!
- 50-69%: 📚 Good effort! Keep practicing!
- Below 50%: 💪 Keep learning! Review the fundamentals!
- Primitive data types
- Default values
- Java keywords and syntax
- Arrays
- JVM (Java Virtual Machine)
- Operators
- Object-Oriented Programming (OOP) concepts
- Inheritance
- Method overriding
- Access modifiers
========================================
JAVA FUNDAMENTALS QUIZ GAME
========================================
Answer the following questions by entering the option number (1-4)
Question 1: What is the default value of a boolean variable in Java?
1. true
2. false
3. null
4. 0
Your answer: 2
✓ Correct!
----------------------------------------
...
========================================
QUIZ COMPLETED!
========================================
Your Score: 8/10
Percentage: 80.00%
Performance:
👍 Great job! You have a solid understanding!
========================================
java-quiz-game/
│
├── JavaQuizGame.java # Main game file
├── README.md # Project documentation
└── .gitignore # Git ignore file
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a new branch (
git checkout -b feature/new-questions) - Add your changes (e.g., more questions, difficulty levels)
- Commit your changes (
git commit -m 'Add new feature') - Push to the branch (
git push origin feature/new-questions) - Open a Pull Request
- Add more questions
- Implement difficulty levels (Easy, Medium, Hard)
- Add a timer for each question
- Create a leaderboard system
- Add categories (OOP, Collections, Exception Handling, etc.)
Ashika - https://github.com/Ashika005
- Questions based on fundamental Java concepts
- Inspired by the need for interactive learning tools
- Built for Java beginners and students
Happy Learning! 🎓
If you found this helpful, please give it a ⭐!