A complete console-based online examination system developed as part of my Java Development Internship at Oasis Infobyte.
This project demonstrates user authentication, admin panel features, exam module, database integration, and result storage using Java & MySQL.
- Login with username & password
- Start exam
- Answer MCQ questions
- Type X anytime to exit exam early
- Auto score calculation
- Score saved automatically in database
- Login as admin
- Add new questions
- View all questions
- View student results
- Logout safely
| Component | Technology |
|---|---|
| Programming Lang | Java (JDK 25) |
| Database | MySQL 8.0 |
| JDBC Driver | mysql-connector-j 9.5 |
| IDE | VS Code |
| Version Control | Git & GitHub |
OnlineExam/
├── src/
│ ├── Login.java
│ ├── MainMenu.java
│ ├── Exam.java
│ ├── AdminPanel.java
│── lib/
│ ├── mysql-connector-j-9.5.0.jar
├── .vscode/
├── README.md
id (INT, PK, AUTO_INCREMENT)
username (VARCHAR)
password (VARCHAR)
role (ENUM: 'admin', 'student')
id (INT, PK, AUTO_INCREMENT)
question_text (TEXT)
option_a (TEXT)
option_b (TEXT)
option_c (TEXT)
option_d (TEXT)
correct_answer (CHAR)
id (INT, PK, AUTO_INCREMENT)
username (VARCHAR)
score (INT)
exam_date (TIMESTAMP DEFAULT CURRENT_TIMESTAMP)
git clone https://github.com/anuskagupta123/Online-Examination-System-Java.git
Create database:
CREATE DATABASE online_exam;
USE online_exam;
Create tables (users, questions, results).
Make sure the connector .jar exists in:
OnlineExam/lib/mysql-connector-j-9.5.0.jar
javac -cp "lib/mysql-connector-j-9.5.0.jar" src/*.java
java -cp "lib/mysql-connector-j-9.5.0.jar;src" Login
- Login
- Start exam
- Answer MCQs
- Exit anytime with X
- Score saved
- Login
- Add questions
- View questions
- View results
You can add images like:



- GUI version using JavaFX
- Timer for each question
- Random question selection
- Email score to student
- Export results to Excel
Anuska
Java Developer | Oasis Infobyte Intern
GitHub: @anuskagupta123
If you like this project, don’t forget to star the repository ⭐ on GitHub!