Professional · Interview Prep · Software engineering

Java Interviews

Original questions Java backend panels ask, junior to senior, with visual model answers and a timed mock interview.

  • USD 29
  • Intermediate–Advanced
  • 25h
  • 32 lessons
  • No certificate

Not affiliated with or endorsed by Oracle, the OpenJDK project, the Spring project or any employer, and not based on any employer's real interview questions.

What you’ll learn

  • Predict and explain what Java code does: primitives and references, pass-by-value, boxing, dispatch, initialization order, equals and hashCode, strings and exceptions
  • Explain how generics and the core collections work inside (erasure, PECS, HashMap buckets and resizing, ConcurrentHashMap) and choose the right collection for a production workload
  • Use modern Java from 8 to 25 (lambdas, streams, Optional, records, sealed types, pattern matching, virtual threads) and plan a Java upgrade in production
  • Write correct concurrent Java with executors, CompletableFuture, locks and atomics, reason with the Java Memory Model, and find deadlocks, races and pool starvation
  • Explain the JVM, its garbage collectors and memory areas, and diagnose memory leaks, OutOfMemoryError, GC pauses and high CPU from heap dumps, thread dumps, GC logs and JFR
  • Build Spring Boot services that avoid the classic proxy, transaction and JPA pitfalls (self-invocation, rollback rules, N+1, lazy loading, connection-pool exhaustion)
  • Design resilient, observable and well-tested Java microservices (timeouts, retries, circuit breakers, idempotency, JUnit 5, Mockito, Testcontainers)
  • Solve live coding and design rounds in idiomatic, tested Java and talk through complexity and trade-offs

Skills you’ll practise

  • Java
  • Java 17
  • Java 21
  • Java 25
  • OOP
  • equals and hashCode
  • Immutability
  • Strings
  • Exceptions
  • Generics
  • Collections
  • HashMap
  • ConcurrentHashMap
  • Streams
  • Lambdas
  • Optional
  • Records
  • Sealed classes
  • Pattern matching
  • Concurrency
  • Java Memory Model
  • CompletableFuture
  • Executors
  • Virtual threads
  • Structured concurrency
  • JVM
  • Garbage collection
  • G1
  • ZGC
  • Memory leaks

About this course

Interview preparation for junior, mid-level and senior engineers interviewing for Java backend roles. Questions are asked the way real panels ask them (predict the output, find the bug, explain the trade-off, debug the production incident) across the core language and OOP, object contracts, strings and exceptions, generics and collection internals, Java 8 to 25, concurrency and virtual threads, the JVM, garbage collection and memory leaks, Spring and Spring Boot, JPA and Hibernate, production services, testing and debugging, and the coding and design rounds. Questions and answers are original, every stated output was compiled and run, and Java facts are checked against the official documentation.

How you will prepare

  • 32 question sets across 12 units: each question card says what the interviewer is looking for, gives a visual model answer, a weak and a strong answer side by side and the follow-ups to expect
  • Practice questions: multiple choice with an explanation of every option, and written answers scored against a rubric by the AI coach (or by your own self-check against the model answer)
  • A timed mock interview (20 questions in 45 minutes): a random mix from every unit, scored per unit with a list of questions to review. No pass mark; retake it as often as you like
  • A readiness view per unit: questions practised, written-answer scores and your latest mock interview
  • Flashcards for the facts and commands worth memorising, reviewed on a spaced schedule

Interview preparation: there is no certificate, and nothing here promises a hiring outcome.

Independent interview preparation. Not affiliated with or endorsed by Oracle, the OpenJDK project, the Spring project or any employer, and not based on any employer's real interview questions. All questions and answers are original; Java and framework facts are as of December 2026; numbers are illustrative. Java is a registered trademark of Oracle and/or its affiliates.

Syllabus

12 units, 32 lessons, about 25 hours.

1Unit 1: How Java Interviews Run3% of the mock interview2 topics1h 22m

How a Java backend interview loop usually runs, what each round tests at junior, mid and senior level, and a framework for the live-coding round in Java. You then practise behavioural answers and the production-incident stories senior panels use to judge ownership and judgement.

  • 1.1 The Java Interview Loop and the Live-Coding Framework
  • 1.2 Behavioural Questions and Production-Incident Stories
2Unit 2: Core Language and OOP7% of the mock interview2 topics1h 29m

The core language as panels probe it: primitives and wrappers, references and pass-by-value, the Integer cache, numeric overflow and BigDecimal. You then reason about overloading versus overriding, interfaces and abstract classes, static and instance initialization order with predict-the-output snippets.

  • 2.1 Primitives, Wrappers, References and Pass-by-Value
  • 2.2 OOP in Java: Overloading, Overriding, Interfaces and Initialization
3Unit 3: Object Contracts, Strings and Exceptions8% of the mock interview3 topics2h 9m

The contracts every Java object lives by: equals, hashCode and compareTo, records, and what breaks in a HashSet or TreeMap when they are wrong. You then cover immutability and strings (the pool, interning, StringBuilder) and exception design for services (checked versus unchecked, try-with-resources, suppressed exceptions).

  • 3.1 equals, hashCode, compareTo and Records
  • 3.2 Immutability, Strings and the String Pool
  • 3.3 Exceptions and Error Handling in Services
4Unit 4: Generics and Collections10% of the mock interview3 topics2h 16m

Generics as the compiler sees them (erasure, wildcards, PECS, heap pollution) and the collections underneath (HashMap buckets, treeification and resizing, ArrayList growth, LinkedHashMap, TreeMap, fail-fast iterators). You then choose concurrent and immutable collections for production workloads and explain ConcurrentHashMap's design.

  • 4.1 Generics: Type Erasure, Wildcards and PECS
  • 4.2 Collections Internals: HashMap, ArrayList, LinkedHashMap and TreeMap
  • 4.3 Concurrent Collections and Choosing Collections for Production
5Unit 5: Modern Java: Java 8 to 259% of the mock interview3 topics2h 18m

Functional Java from 8 onwards: lambdas, functional interfaces, method references and streams, with their laziness and pitfalls. You then use Optional, records, sealed types and pattern matching well, and plan an upgrade from Java 8 or 11 to 21 and 25 in production.

  • 5.1 Lambdas, Functional Interfaces and Streams
  • 5.2 Optional, Records, Sealed Types and Pattern Matching
  • 5.3 Java 21 to 25 Features and Upgrading Java in Production
6Unit 6: Concurrency Fundamentals10% of the mock interview3 topics2h 13m

Concurrency from first principles: threads, synchronized, volatile and the happens-before rules of the Java Memory Model. You then size executors, compose CompletableFuture pipelines with timeouts, and use locks, atomics and synchronizers without deadlocks.

  • 6.1 Threads, synchronized, volatile and the Java Memory Model
  • 6.2 Executors, Thread Pools and CompletableFuture
  • 6.3 Locks, Atomics, Synchronizers and Deadlocks
7Unit 7: Virtual Threads and Concurrency in Production7% of the mock interview2 topics1h 33m

Virtual threads as they behave in a real service: mounting, pinning, ThreadLocal costs, and limiting concurrency with semaphores, plus structured concurrency and scoped values. You then debug the concurrency incidents production teams actually hit: pool starvation, races in caches, leaks and deadlocks.

  • 7.1 Virtual Threads, Structured Concurrency and Scoped Values
  • 7.2 Concurrency Bugs in Production: Pool Starvation, Races and Leaks
8Unit 8: JVM Internals, Garbage Collection and Memory10% of the mock interview3 topics2h 19m

The JVM inside: class loading, the memory areas, the JIT and escape analysis. You then choose and tune garbage collectors (G1, ZGC, Parallel) from GC logs and diagnose memory leaks and every kind of OutOfMemoryError from heap dumps and histograms.

  • 8.1 JVM Architecture: Class Loading, Memory Areas and the JIT
  • 8.2 Garbage Collectors and GC Tuning
  • 8.3 Memory Leaks and OutOfMemoryError Diagnosis
9Unit 9: Spring and Spring Boot10% of the mock interview3 topics2h 22m

Spring as an interviewer probes it: dependency injection, bean scopes and lifecycle, and how Boot's auto-configuration decides what to create. You then avoid proxy pitfalls (@Transactional self-invocation, rollback rules, @Async) and run Boot services in production with configuration, Actuator, metrics and graceful shutdown.

  • 9.1 Dependency Injection, Bean Lifecycle and Auto-Configuration
  • 9.2 AOP Proxies, @Transactional and Other Annotation Pitfalls
  • 9.3 Spring Boot in Production: Configuration, Actuator, Observability and Shutdown
10Unit 10: Data Access: JPA, Hibernate and Transactions8% of the mock interview2 topics1h 43m

JPA and Hibernate from the persistence context outward: entity states, dirty checking, lazy loading, N+1 queries and how to fix them. You then design transactions, isolation and locking, size the connection pool and write in batches.

  • 10.1 Entities, the Persistence Context, Lazy Loading and N+1
  • 10.2 Transactions, Locking, Connection Pools and Batch Writes
11Unit 11: Production Services: Resilience, Testing and Debugging9% of the mock interview3 topics2h 36m

Production services end to end: REST API design, timeouts, retries, circuit breakers, idempotency and messaging. You then test them well (JUnit 5, Mockito, Testcontainers, Spring slices) and debug them live from thread dumps, heap dumps, JFR recordings and latency percentiles.

  • 11.1 REST APIs, Microservices and Resilience Patterns
  • 11.2 Testing: JUnit 5, Mockito, Testcontainers and Spring Test Slices
  • 11.3 Performance and Production Debugging: Thread Dumps, Heap Dumps, High CPU and Latency
12Unit 12: Coding and Design Rounds9% of the mock interview3 topics2h 15m

The coding round in idiomatic Java: data-structure problems and concurrency problems, each with complexity, edge cases and tests. You then run low-level and system design rounds for Java backends, from class design to a service that survives production load.

  • 12.1 Data-Structure Coding in Java: LRU Cache, Top-k, Intervals and Sliding Windows
  • 12.2 Concurrency Coding: Bounded Queue, Rate Limiter, Thread-Safe Cache and Parallel Fetch
  • 12.3 Low-Level and System Design Rounds for Java Backends

Who it’s for

Working professionals, at Intermediate–Advanced level.

Time needed

Self-paced, with no start dates or deadlines. Working through everything takes about 25 hours in total; the syllabus shows the time for each unit.

Course authors

iLearnRight software engineering team

Written by practising Java backend engineers for engineers preparing for Java interviews, junior to senior. Every question and model answer is original; Java and framework facts were checked against the official documentation on the dates in the sources list and are as of December 2026, and every predict-the-output and coding snippet was compiled and run on JDK 25 at the Java release its title names. Numbers in examples are illustrative. iLearnRight is independent and not affiliated with Oracle, the OpenJDK project or the Spring project.

Questions

Is this course self-paced?

Yes. There are no start dates or deadlines: open the next lesson whenever you have time. Working through everything takes about 25 hours.

What is included?

32 lessons, 322 practice questions with every answer choice explained, 224 flashcards reviewed on a spaced schedule. An AI coach can give hints when you are stuck. Audio versions of the lessons are not available for this course yet.

Does this course give a certificate?

No. It is interview preparation: it tracks how ready you are in each area, and its mock interview is practice, so there is no certificate.

Does this course prepare me for an external exam?

No. There is no external exam: the units, their weights and the final assessment are this course's own, and all questions are written for this course.

More like this

Related courses

All Interview Prep courses
Interview Prep

Professional · Data engineering

Databricks Data Engineer Interviews

Prepare for data engineering interviews at Databricks-heavy teams: about 200 original questions a hiring panel asks mid-level and senior engineers, from Spark execution and skew to Delta Lake MERGE, streaming state, Unity Catalog, cost and on-call scenarios, system design, live coding, and serving data through metric views, Genie and data APIs. Every model answer leads with a picture (a plan, a Delta log, a watermark timeline, a cost breakdown) and shows a weak answer next to a strong one, with the follow-ups to expect. Practise with rubric-scored open answers and a timed mock interview.

  • Intermediate–Advanced
  • 21h
  • 32 lessons
  • Interview prep
  • Lessons
  • Flashcards
  • Practice
  • AI coach

Not affiliated with or endorsed by Databricks, and not based on any employer's real interview questions.

USD 29No certificate

Free with a group code. Online payment is coming soon; until then, request access.

Interview Prep

Professional · Software engineering

Python Interviews

Prepare for Python interviews for backend, data and AI engineering roles: about 190 original questions asked the way a senior panel asks them. Predict the output of a snippet, debug a failure, explain a trade-off: the data model and references, closures and decorators, generators, the MRO, typing, exceptions and context managers, the GIL, free-threading and asyncio, performance, testing and packaging, pandas, FastAPI and LLM API calls, and a live coding round. Every model answer leads with a picture (a reference diagram, a call stack, an event-loop timeline, an MRO graph) and shows a weak ans…

  • Intermediate–Advanced
  • 19h
  • 27 lessons
  • Interview prep
  • Lessons
  • Flashcards
  • Practice
  • AI coach

Not affiliated with or endorsed by the Python Software Foundation or any employer, and not based on any employer's real interview questions.

USD 29No certificate

Free with a group code. Online payment is coming soon; until then, request access.

Interview Prep

Professional · AI engineering

AI, LLM & ML Engineer Interviews

Prepare for ML engineer, AI/LLM engineer and applied scientist interviews: about 225 original questions asked the way senior panels ask them (derive it, debug it, choose with trade-offs, design under constraints), from bias and variance, metrics and gradient boosting to attention, the KV cache, LoRA and preference tuning, RAG, agents, evaluation, LLMOps, ML system design and responsible AI. Every model answer leads with a picture (an architecture, a loss curve, a ROC curve, a RAG flow, worked memory and cost numbers) and shows a weak answer next to a strong one, with the follow-ups to expect.…

  • Intermediate–Advanced
  • 23h
  • 35 lessons
  • Interview prep
  • Lessons
  • Flashcards
  • Practice
  • AI coach

Not affiliated with or endorsed by any employer, AI lab or vendor named in the course, and not based on any employer's real interview questions.

USD 29No certificate

Free with a group code. Online payment is coming soon; until then, request access.