Skip to content
Java LLD interview handbook · PDF ebook

Design classes interviewers trust, in clean Java.

Turn requirements into classes, relationships and patterns, then into working Java. Learn OOP, SOLID, all 23 GoF patterns and concurrency, and practise on 16 real problems like BookMyShow, Splitwise and a rate limiter.

14
part curriculum
23
GoF patterns
16
coded case studies
60
minute framework
₹299₹59950% off
  • Secure checkout via Razorpay
  • Digital PDF ebook
  • Read on phone, tablet or laptop
Mastering System Design LLD ebook coverPDF ebook
Choose your book

LLD, HLD, or both rounds together

LLD is how one service is built in code. HLD is how the whole system scales. Most product companies ask both, and the combo covers both rounds.

This page
Low-level design · Java

Mastering System Design LLD

How one service is built: classes, relationships, SOLID, design patterns, concurrency and working Java.

  • 16 coded LLD case studies
  • All 23 GoF design patterns
  • 60-minute interview framework
₹299₹59950% off
High-level design

Mastering system design- high level design

Architecture for the whole system: requirements, estimates, APIs, data stores, caching, queues and failures.

  • 19 HLD case studies
  • 16 building-block primers
  • 45-minute interview playbook
₹299₹59950% off
Details
Best value
Best value · both rounds

Mastering System Design

Practical Java class design in LLD, plus distributed architecture and scalable backends in HLD.

  • This LLD book and the HLD book
  • 16 LLD problems plus 19 HLD case studies
  • Java code, design patterns and architecture
₹499₹1,19858% off
Details
TopicHLDLLD (this book)
FocusArchitecture of the whole systemClass-level design inside one service
Core questionHow does it scale to millions of users?How do I model objects and relationships?
ArtifactsComponents, APIs, data stores, queuesClasses, interfaces, patterns, working code
You decideSQL vs NoSQL, caching, sharding, consistencySOLID, design patterns, extensibility, concurrency
Free preview

Read real pages before you pay

Actual pages from the book. Use the arrows, the page strip, or your keyboard's arrow keys.

  • No download, no sign-up
  • Same layout and depth as the full book
  • Full book: 23 patterns, 16 coded case studies
Sample pages
Sample pages load as you scroll here.
What's inside

16 LLD problems, designed and coded in Java

The problems product companies actually ask. Each one comes with a UML class diagram, a Java implementation and a runnable scenario. Filter by the pattern it uses.

16 of 16 case studies

  1. 01BookMyShow

    Movie Ticket Booking

    Concurrency + Seat Locking

    Model cities, theatres, screens and show-specific seats. Explore temporary seat holds, booking states, category pricing and safe cancellation.

    Key classesMovie, Theatre, Screen, Show, Seat, Booking, Payment, User

    • State
    • Strategy
    • Observer
  2. 02Zepto

    Inventory Management

    Inventory + concurrency

    Track product batches across warehouses, reserve stock during checkout, apply issuance policies and trigger low-stock notifications.

    Key classesProduct, Inventory, Warehouse, StockItem, Order, Reservation

    • Strategy
    • Observer
    • Factory Method
  3. 03Parking System

    Parking Lot

    Object modeling + pricing

    Allocate compatible spaces across parking floors, issue tickets and calculate fees with interchangeable pricing policies.

    Key classesParkingLot, Floor, Spot, Vehicle, Ticket, PricingStrategy

    • Strategy
    • Factory Method
    • State
  4. 04Notification Platform

    Notification System

    Multiple channels

    Coordinate email, SMS, push and in-app delivery with templates, preferences, priorities and bounded retry policies.

    Key classesNotification, Channel, Template, UserPreference, NotificationDispatcher

    • Factory
    • Strategy
    • Observer
  5. 05API Platform

    Rate Limiter

    Algorithms + thread safety

    Compare fixed window, sliding window log, sliding window counter, token bucket and leaky bucket algorithms with concurrent requests.

    Key classesRateLimiter, Algorithm, TokenBucket, SlidingWindow, Client

    • Strategy
    • Factory Method
  6. 06Logging Platform

    Logger

    Thread safety + extensibility

    Design named loggers, severity filters, pluggable appenders, formatters and synchronized writes.

    Key classesLogger, LogLevel, LogHandler, ConsoleAppender, FileAppender

    • Singleton
    • Chain of Responsibility
    • Strategy
  7. 07IRCTC

    Train Reservation System

    Booking + state transitions

    Model trains, routes, coaches and berths with booking states, cancellation rules and waitlist promotion.

    Key classesTrain, Station, Route, Coach, Seat, Passenger, Booking

    • State
    • Strategy
    • Observer
  8. 08Zoomcar

    Car Rental System

    Vehicle availability + pricing

    Separate future reservations from active rentals, validate date ranges and compose rental pricing with optional add-ons.

    Key classesVehicle, Car, Customer, Rental, Location, PricingStrategy

    • Strategy
    • State
    • Factory
  9. 09Splitwise

    Expense Sharing

    Strategy + domain modeling

    Work with equal, exact and percentage splits, consistent rounding, balance sheets and debt settlement.

    Key classesUser, Expense, Split, Group, Balance, SplitStrategy

    • Strategy
    • Factory Method
Design patterns

All 23 GoF patterns, and when to use each

Not a definition list. Each pattern comes with a real example and the signal that tells you to reach for it in an interview.

  • Singleton

    Ensures that a class has only one instance and provides a controlled access point.

    Example
    Logger, Configuration Manager, Cache Manager
    Use when
    When exactly one shared instance is required.
  • Factory Method

    Creates objects without exposing the exact object creation logic to the client.

    Example
    Notification Factory, Payment Factory
    Use when
    When object creation depends on runtime input.
  • Abstract Factory

    Creates families of related objects without specifying their concrete classes.

    Example
    UI components, payment provider families
    Use when
    When multiple related products must work together.
  • Builder

    Constructs complex objects step by step.

    Example
    User, Car, HTTP Request, Pizza
    Use when
    When an object has many optional parameters.
  • Prototype

    Creates new objects by copying an existing object.

    Example
    Document templates, game objects
    Use when
    When object creation is expensive or cloning is convenient.

Which pattern? A quick cheat sheet from the book

  • Changing algorithm?Think Strategy.
  • Different object creation?Think Factory.
  • Multiple subscribers?Think Observer.
  • Additional behaviour?Think Decorator.
  • Many optional fields?Think Builder.
  • Different object states?Think State.
  • Incompatible external API?Think Adapter.
  • Multiple handlers?Think Chain of Responsibility.
Curriculum

14 parts, from first class to production

Start from OOP and work up to patterns, concurrency, Spring Boot and the interview itself.

  1. Part 01LLD & interview foundations

    Design trade-offs, requirements, class ownership, interview evaluation and incremental modeling.

  2. Part 02Core and modern Java

    Types, memory, interfaces, collections, generics, functional Java, exceptions and validation.

  3. Part 03Object-oriented programming

    Encapsulation, abstraction, polymorphism, inheritance, composition, identity and dependency injection.

  4. Part 04UML and engineering diagrams

    Class, sequence, activity, state and architecture diagrams, plus Mermaid and PlantUML.

  5. Part 05Software design principles

    SOLID, DRY, KISS, YAGNI, GRASP, code smells and safe refactoring.

  6. Part 0623 GoF design patterns

    Creational, structural and behavioral patterns, selection guidelines and combined applications.

  7. Part 07Enterprise architecture patterns

    Layered and clean architecture, domain-driven design, events, messaging and resilience patterns.

  8. Part 08Java multithreading

    Thread lifecycle, Executor framework, CompletableFuture, Java Memory Model and advanced concurrency.

  9. Part 09Synchronization and locking

    Race conditions, intrinsic/explicit locks, atomics, deadlocks and distributed consistency.

  10. Part 10Data structures for LLD

    Choose efficient collections, build reusable in-memory components and analyze performance.

  11. Part 11APIs, databases and Spring Boot

    REST contracts, persistence, JPA/Hibernate, clean architecture, security and observability.

  12. Part 12Testing and production engineering

    Unit, integration and concurrency testing, maintainability, quality and production readiness.

  13. Part 1360-minute interview framework

    Scope requirements, communicate diagrams, write core code and handle follow-up questions.

  14. Part 1416 real-world LLD case studies

    Booking, inventory, parking, notifications, rate limiting, payments and more with Java implementations.

The method

How to answer an LLD round in 60 minutes

The book's ten-step framework. Every case study follows it, so you can apply it to a problem you have never seen.

  1. 01
    Clarify requirements

    Identify scope, actors and core use cases.

  2. 02
    Find entities

    Extract nouns, domain objects and responsibilities.

  3. 03
    Define relationships

    Association, aggregation, composition and inheritance.

  4. 04
    Assign responsibilities

    Decide which class owns which behaviour.

  5. 05
    Identify changing parts

    Find areas likely to change independently.

  6. 06
    Apply principles

    Use SOLID, KISS, DRY and low coupling.

  7. 07
    Choose patterns

    Use patterns only where they solve a real problem.

  8. 08
    Handle concurrency

    Identify shared state and synchronisation needs.

  9. 09
    Write code

    Implement interfaces, classes and collaborations.

  10. 10
    Discuss tradeoffs

    Explain alternatives and why your design works.

The 12 principles behind every design

  • Single ResponsibilityOne class should have one reason to change.
  • Open / ClosedOpen for extension, closed for modification.
  • Liskov SubstitutionSubtypes should remain substitutable for their base types.
  • Interface SegregationPrefer focused interfaces over large interfaces.
  • Dependency InversionHigh-level logic should depend on abstractions.
  • KISSKeep the design simple unless complexity provides real value.
  • DRYAvoid duplicating business logic and knowledge.
  • YAGNIDo not build functionality before there is a real requirement.
  • Composition over InheritancePrefer composing behavior when inheritance creates unnecessary coupling.
  • Program to InterfacesDepend on contracts rather than concrete implementations.
  • High CohesionKeep closely related responsibilities together.
  • Low CouplingMinimize unnecessary dependencies between components.
Who it's for

From your first LLD round to SDE 2

  • Complete beginners

    Learn OOP, SOLID, relationships and design patterns from the ground up.

  • SDE 1 developers

    Build the foundation required for machine coding and LLD interviews.

  • SDE 2 developers

    Improve design thinking, extensibility and tradeoff discussions.

  • Backend engineers

    Turn business requirements into clean object oriented services.

  • Java developers

    See how object oriented design, patterns, concurrency and locking become clean Java.

  • Interview candidates

    Practice realistic LLD questions with a structured design process.

What you get

  • Digital PDF ebook

    Read on laptop, tablet or phone and revise anywhere.

  • 14-part curriculum

    From OOP and UML to Spring Boot, testing and production engineering.

  • All 23 GoF patterns

    Each with its purpose, a real example and when to reach for it.

  • 16 coded case studies

    UML class diagrams, Java implementations and runnable driver scenarios.

  • Concurrency and locking

    Threads, executors, the Java Memory Model, locks and deadlocks.

  • 60-minute interview framework

    Scope, diagram, code the core and handle the follow-ups.

₹299₹59950% off
Questions

Before you buy

Anything else? Write to [email protected]

What is covered in the LLD book?

The book spans 14 parts: LLD foundations, Java language and OOP, UML, SOLID/GRASP, all 23 GoF patterns, enterprise and event-driven patterns, multithreading, locking, data structures, APIs, persistence, Spring Boot, security, testing, a 60-minute interview framework and 16 real-world design case studies.

Does it include complete Java code for design problems?

Yes. The case studies include UML class diagrams, Java implementations and runnable driver scenarios for problems such as movie tickets, parking, inventory, notifications and rate limiting.

Does it cover Spring Boot, databases and backend architecture?

Yes. Dedicated chapters cover API design, database and persistence modeling, JPA/Hibernate, clean architecture with Java and Spring Boot, security, resilience and observability. Interview exercises can still focus on in-memory design where appropriate.

Are concurrency and locking explained?

Yes. The book covers Java threads, executors, CompletableFuture, the Java Memory Model, locks, atomic operations, deadlocks, concurrent collections and related consistency issues.

What is the difference between LLD and HLD?

LLD answers how one component is built: classes, interfaces, relationships, SOLID principles, design patterns and working code. HLD answers how a whole system scales: services, databases, caching, messaging and consistency. This page covers LLD; the HLD book and an HLD + LLD combo are linked on this page.

Can I preview before buying?

Yes. Real sample pages from the book are on this page. Read them right here, page by page, with no download or sign-up.

How does checkout work?

Pay once through our secure payment partner. The ebook is a digital PDF that you can read on your phone, tablet or laptop.

Is this a physical book?

No. This is a digital PDF ebook.

Is the digital purchase refundable?

No. Digital ebook purchases are non-refundable after successful payment.

How can I contact support?

Email [email protected] for purchase or ebook support.

Explain why each class exists, then write it in Java.

23 patterns, 16 coded case studies and one interview method, in a digital PDF you can read anywhere.

₹299₹59950% off
Applied to 50+ jobs and heard nothing?Resume Lab by Target Trek

Ready for the LLD round? Make sure your resume gets you there.

Most resumes are rejected by software or skimmed in ten seconds. Find out exactly what is costing you shortlists, and how to fix it.

  • AI report in about 2 minutesOverall and ATS score, section grades, missing keywords and rewritten bullets.
  • A working professional reviews itPlain-language notes on your story, level and fit. Not a template.
  • LinkedIn review tooYour profile checked against your resume, so both tell one story.

One-time payment · No subscription · Plans cannot be cancelled once bought

Mastering System Design LLD (Java)
₹299₹59950% off