Grokking Java Interview Questions

Answer the Java questions that interviews ask, from HashMap internals to virtual threads, with runnable code, follow-up questions, and predict-the-output exercises.

Level:
Intermediate
Study Time:
40h
Lessons:
114
Playgrounds:
432
Assessments:
180
Updated
Yesterday
4.7
(34 ratings)
281 learners
Arslan Ahmad
Created byArslan Ahmad
Ex FAANG Manager, Expert Behind Grokking Java Interview Questions

Course Overview

Java interviews ask how the language and its libraries work, not only how to use them. A typical conversation starts with a simple question, such as how a HashMap finds a key, and continues with follow-up questions until the mechanism is clear. This course is organized around those questions. Each lesson takes one topic and answers its main questions. Every answer starts with a short direct statement, explains the mechanism with real numbers from the JDK, and names a common wrong answer. Each question is marked Junior, Mid-level, or Senior, and has follow-up questions with folded answers, so you can try them before you read. Many answers include a small program that you can run. The course covers the JVM, the language core, class design, generics, collections, exceptions, streams, concurrency, memory and garbage collection, modern Java up to Java 25, production topics such as JDBC and testing, and Spring. Most lessons end with a program whose output you predict before you run it. Later chapters practice code reading and coding tasks, and the course closes with mock rounds for three levels and a final exam. It suits engineers who know Java syntax and want to explain how Java works with confidence.

Grokking Java Interview Questions Image
This course
Lifetime access to this course
One-time payment. Yours forever.
All 79 courses
Annual plan
Discussions
Certificate
Free updates
Own everything, once
Grokking Java Interview Questions Image
This course
Lifetime access to this course
One-time payment. Yours forever.
All 79 courses
Annual plan
Discussions
Certificate
Free updates
Own everything, once

What you'll learn in Grokking Java Interview Questions

  • Answer each Java question with a direct statement, then explain the mechanism behind it with numbers and code.
  • Get the language core right: pass by value, equals and hashCode, the string pool, and initialization order.
  • Reason about generics: type erasure, bridge methods, bounded types, wildcards, and the PECS rule.
  • Handle exceptions and resources correctly, including a return inside finally and suppressed exceptions.
  • Explain race conditions, synchronized, volatile, the Java Memory Model, deadlocks, and interruption.
  • Understand garbage collection, G1 and ZGC, reference types, memory leaks, heap dumps, and thread dumps.
  • Answer production questions on JDBC, transactions, serialization, reflection, testing, and Spring internals.
  • Check yourself with chapter assessments, mock rounds for junior, mid-level, and senior levels, and a final exam.
  • Explain the JVM: bytecode, the JIT compiler, class loading and initialization, and the Java release cycle.
  • Compare abstract classes and interfaces, and choose enums, records, sealed types, and composition with reasons.
  • Describe how ArrayList, HashMap, TreeMap, and PriorityQueue work inside, including resizing and tree buckets.
  • Use lambdas, streams, collectors, Optional, and parallel streams, and know when a plain loop is better.
  • Work with thread pools, CompletableFuture, locks, atomic variables, ConcurrentHashMap, and virtual threads.
  • Know what changed from Java 8 to Java 25, including records, pattern matching, modules, and virtual threads.
  • Practice code reading, bug finding, and coding tasks such as an LRU cache, a blocking queue, and a rate limiter.

Course Content

• 15 Chapters • 114 Lessons
1.

The JVM and the Java Platform

6 lessons

JDK, JRE, and JVM

What the JVM, the runtime and the JDK each contain, and what platform independence really means.

From Source Code to a Running Program

What javac produces, how the JVM interprets and compiles bytecode, and how to read javap output.

Class Loading and Initialization

When a class is loaded, how class loaders delegate, and when static initializers run.

The main Method and Program Startup

The main signature, command line arguments, exit codes, shutdown hooks, and how a program ends.

Java Releases and Long Term Support

The six month release cycle, long term support versions, preview features, and how to choose a version.

Chapter Assessment: The JVM and the Java Platform

What people say about our courses

Ashley Pean avatar
Ashley Pean
Software Engineer
Check out Grokking the Coding Interview. Instead of trying out random Algos, they break down the patterns you need to solve them. Helps immensely with retention!
Arijeet avatar
Arijeet
Software Engineer
Just completed the “Grokking the system design interview”. It's amazing and super informative. Have come across very few courses that are as good as this!
Steven Zhang avatar
Steven Zhang
Software Engineer
Just wanted to say thanks for your Grokking the system design interview resource (https://lnkd.in/g4Wii9r7) - it helped me immensely when I was interviewing from Tableau (very little system design exp) and helped me land 18 FAANG+ jobs!
Roger Cruz avatar
Roger Cruz
Software Engineer
The world gets better inch by inch when you help someone else. If you haven't tried Grokking The Coding Interview, check it out, it's a great resource!
Simon Barker avatar
Simon Barker
Software Engineer
This is what I love about http://designgurus.io’s Grokking the coding interview course. They teach patterns rather than solutions.
Eric avatar
Eric
Software Engineer
I've completed my first pass of "grokking the System Design Interview" and I can say this was an excellent use of money and time. I've grown as a developer and now know the secrets of how to build these really giant internet systems.

About the Author

Arslan Ahmad

Arslan Ahmad

Design Gurus Founder
Ex-FAANG Manager
Meta
Microsoft
Google
Amazon
Uber

Industry Expertise & Leadership

Arslan Ahmad is the lead author of Grokking Java Interview Questions. As the founder of Design Gurus and a former FAANG hiring manager, he has worked at industry giants like Facebook (now Meta) and Microsoft.

He has conducted hundreds of system design interviews, giving him unique insight into what top tech companies look for in candidates.

The course also incorporates expertise from senior engineers at Google, Meta, Amazon, Microsoft, and Uber, ensuring you learn system design best practices from professionals who have built and scaled real-world systems.

500+

Interviews Conducted

10k+

Students Taught

Related Courses

Grokking Java Basics
Grokking Java Basics
4.8
559 learners
Discounted price for Your Region

$48

Grokking Java Intermediate
4.7
1.2K learners
Discounted price for Your Region

$48

Grokking Python Fundamentals
Learn to code in Python and unlock new career opportunities with our comprehensive, hands-on course.
4.4
1.8K learners
Discounted price for Your Region

$48

FAQs

It is a written course built around the questions that Java interviews ask. Each lesson takes one topic, answers its main questions with a direct statement, and then explains the mechanism with real numbers from the JDK and code. It covers the JVM, the language core, collections, concurrency, memory, modern Java, production topics, and Spring.

It is for engineers who already write Java and are preparing for an interview, from new graduates to senior engineers. It also suits a working developer who uses HashMap, streams, or @Transactional every day and wants to be able to explain how they work.

You need Java syntax, classes, and basic use of collections. If you are new to Java, start with Grokking Java Basics and Grokking Java Intermediate, and return to this course when you prepare for interviews.

A list gives you an answer to memorize. This course explains why the answer is true, so that you can also answer the question that comes next. Every main question comes with a common wrong answer and with follow-up questions that go one step deeper, and many answers include a program that proves the claim.

Yes. Every main question is marked Junior, Mid-level, or Senior, so you can read only your level when time is short. The course ends with a mock round for each of the three levels, with model answers and a scoring table that points to the lessons to read again.

It covers Java 8 to Java 25. The programs you run use Java 17 syntax. Features of Java 21, such as virtual threads, pattern matching for switch, and record patterns, are shown with real output from Java 21. Changes in later releases are described from the official documentation of each feature.

Yes. Many answers include a short Java program that runs in the course player with the Run button, and you can change it and run it again. Code that needs a database, a test framework, or Spring is shown read-only together with the real output it produced.

Yes, in two parts. The first covers threads, race conditions, synchronized, the Java Memory Model and volatile, wait and notify, deadlocks, ThreadLocal, and interruption. The second covers thread pools, CompletableFuture, explicit locks, atomic variables, ConcurrentHashMap, synchronizers, the fork join pool, and virtual threads.

Yes, at the depth that interviews ask. It explains dependency injection, bean scopes and the bean lifecycle, auto-configuration, proxies and @Transactional, request handling in Spring MVC, and the N plus one problem in Spring Data JPA. For a full course on building services with Spring, see Grokking Spring Boot.

No. It covers the Java side of a coding round: reading code and predicting its output, finding concurrency bugs, and writing an LRU cache, a thread-safe singleton, a blocking queue, and a rate limiter. For algorithm patterns, use Grokking the Coding Interview.

There is practice in every part. Follow-up questions have folded answers, so you can answer first and then compare. Most lessons end with a program whose output you predict before you run it. Every chapter except the last one ends with an adaptive assessment that draws a fresh set of questions on every attempt, and the last chapter holds the mock rounds and a final exam.

Read the questions at your level first, and use the bold first sentence of each answer as the short answer. Then take the mock round for your level, and use its scoring table to choose the lessons to read in full. If you must choose, start with the chapters on the language core, collections, and concurrency.

Design Gurus logo
One-Stop Portal For Tech Interviews.
About Us
Our Team
Careers
Partners
Contact Us
Become Affiliate
Copyright © 2026 Design Gurus, LLC. All rights reserved.