A console-based Ticket Booking System built using Core Java that demonstrates Multithreading and Synchronization to prevent overbooking when multiple users try booking tickets at the same time.
This project simulates a real-world ticket booking scenario where multiple users book tickets concurrently.
To ensure correct booking and avoid race conditions, the system uses Java Threads with the synchronized keyword.
✅ Multiple users booking at the same time (Concurrency)
✅ Ticket count is limited (Stock management)
✅ Prevents overbooking using synchronized
✅ Displays booking success/failure messages
✅ Simple and beginner-friendly core Java project
- Core Java
- Multithreading
- Synchronization (
synchronized) - Thread Lifecycle
- join() method
- OOP Basics
- Total Tickets = 10
- Total Users = 16
- Only 10 bookings should be successful ✅
- Remaining users should see Failed booking due to no tickets ❌
ticket-booking-system-java/
│── src/
│ ├── (Java source files)
│
│── screenshots/
│ ├── console-output.png
│ ├── main-code.png
│ ├── project-structure.png
│
│── .gitignore
│── README.md
git clone https://github.com/mkmishra2503/ticket-booking-system-java.git

