
Make talent quality your leading analytic with skills-based hiring solution.

Most Java interviews fail in the same way. The interviewer asks “What is a HashMap?”, the candidate gives the textbook definition, and both leave the room knowing nothing new. Recall is cheap to fake and easy to prepare for. What separates Java developers is whether they can explain why something works, apply it to a real problem and name the tradeoff.
This guide gives you Java developer interview questions grouped by topic, with what a strong answer includes, what a weak one sounds like and a rubric to score both. Use it after candidates have cleared a knowledge screen such as the Java skill test, so interview time goes to depth instead of basics.
Java still runs a large share of backend services, financial systems, Android apps and cloud workloads. A typical Java developer builds and maintains server side services, works with relational databases through SQL and ORM tools, designs object oriented code, writes tests and ships to cloud environments. Java 17, Java 21 and Java 25 are the recent long term support releases, so a candidate whose knowledge stops at Java 8 is working with a version released in 2014.
Skills to look for: core Java and the JVM, the collections framework, concurrency, relational databases with SQL and ORM, web services and REST APIs, a framework such as Spring Boot, object oriented design and test driven development.
Score every answer on the same four level scale. It keeps panels consistent and gives you something to compare when two interviewers disagree.
| Score | Level | What you hear |
|---|---|---|
| 1 | Recall | A definition, often memorized, with no example |
| 2 | Explains | Correct reasoning about how it works |
| 3 | Applies | A concrete example from their own work or a worked scenario |
| 4 | Judges | Names tradeoffs, edge cases and when not to use it |
A mid level hire should average 3 on core Java. Senior candidates should reach 4 on concurrency and design.
Strong answer: Java is always pass by value. For objects, the value passed is a copy of the reference, so a method can change the object’s state but can’t make the caller’s variable point at a new object.
Red flag: “Primitives by value, objects by reference.”
Strong answer: encapsulation hides state behind methods so invariants can’t be broken from outside. Polymorphism lets one interface have many implementations, chosen at runtime through method overriding. Good candidates give an example from code they wrote.
Red flag: definitions with no example.
Strong answer: checked exceptions must be declared or handled and represent recoverable conditions such as a missing file. Runtime exceptions signal programming errors such as a null reference and aren’t forced on the caller. Strong candidates have a view on when to wrap checked exceptions and why empty catch blocks are dangerous.
Red flag: catching Exception everywhere.
Strong answer: a field marked transient is skipped during Java serialization, used for passwords, caches or fields that can be recomputed. It returns to its default value after deserialization.
Strong answer: Java is statically typed; types are checked at compile time. Dynamic languages such as Python check types at runtime. A candidate scoring 4 notes that var in Java 10 and later infers types but remains static.
Strong answer: the JVM reclaims memory from objects no longer reachable from GC roots. Strong candidates mention generational collection, name a collector such as G1 or ZGC, and describe a memory leak they’ve debugged, for example a static collection that keeps growing.
Red flag: “Java has no memory leaks.”
Strong answer: lambdas are concise implementations of functional interfaces. With the Streams API they let developers write declarative collection processing and pass behavior as data. Strong candidates also know when a plain loop is clearer.
Strong answer: HashMap isn’t thread safe and allows one null key. ConcurrentHashMap supports concurrent reads and writes without locking the whole map, rejects null keys and values, and offers atomic operations such as computeIfAbsent. A score of 4 explains why wrapping a HashMap in synchronizedMap scales worse.
Strong answer: a process has its own memory space; threads share the memory of their process. Shared memory makes threads cheap to create and communicate but exposes race conditions, which is why visibility and synchronization matter.
Strong answer: an enum singleton or the holder idiom, both thread safe without explicit locking. For example:
public final class Config {
private Config() {}
private static class Holder {
static final Config INSTANCE = new Config();
}
public static Config get() { return Holder.INSTANCE; }
}
A candidate scoring 4 adds that singletons make testing harder and that dependency injection often removes the need.
Strong answer: a factory hides how objects are created so callers depend on an interface, not a concrete class. Good examples: choosing an implementation from configuration or isolating creation logic for testing.
Strong answer: atomicity, consistency, isolation and durability, each explained with a transaction example. Strong candidates connect isolation levels to problems they’ve seen, such as dirty reads, and to how @Transactional behaves in Spring.
Strong answer: Floyd’s cycle detection with a slow and a fast pointer, O(n) time and O(1) space. A HashSet of visited nodes is acceptable but uses O(n) memory, and the candidate should say so.
Strong answer: use it as a follow up to question 5. Ask the candidate to compare Java with a language they’ve used, such as Python or JavaScript, in terms of when errors surface and how safe large refactors are.
These questions show whether a candidate has kept up with the language.
Conversation shows understanding; code shows ability. Pick one exercise sized to the role and give 30 to 45 minutes.
Glider’s coding simulations run exercises like these in full project environments, and live coding interviews let an interviewer and candidate work in a shared editor.
Score these on structured thinking, ownership and evidence, using the same 1 to 4 scale.
| Area | Weight | Score (1 to 4) |
|---|---|---|
| Core Java and OOP | 25% | |
| Collections and concurrency | 25% | |
| Modern Java | 15% | |
| Practical exercise | 25% | |
| Communication and ownership | 10% |
Agree on weights with the hiring manager before the first interview. Changing them after seeing candidates invites bias.
When you’re hiring several Java developers at once, the same questions can run through AI interviews that use fixed questions and evaluate answers against a rubric, with a recruiter reviewing every result. For other roles, see the Python developer interview questions guide or browse the interview questions library.
Cover core Java (argument passing, exceptions, garbage collection), collections and concurrency (ConcurrentHashMap, threads, singletons), modern Java (records, virtual threads), one practical exercise and two behavioral questions.
Use a shared rubric: recall, explains, applies, judges tradeoffs. Score each answer from 1 to 4 and compare scores across interviewers before discussing the candidate.
Pass by value, checked versus runtime exceptions, HashMap versus ConcurrentHashMap, garbage collection, the Singleton pattern and lambda expressions.
The recent long term support releases (Java 17, 21 and 25), plus Java 8 concepts such as lambdas and streams that still appear in most codebases.
Plan 45 to 60 minutes for the technical interview and 30 to 45 minutes for a practical exercise, after a short knowledge screen.
Yes. A short screen such as the Java skill test confirms fundamentals first, so the interview can focus on applied questions and the exercise.
Ask about concurrency bugs they’ve fixed, garbage collection tuning, virtual threads, schema changes on live systems and design tradeoffs. Expect answers at level 4 on the rubric.

A strong architect portfolio tells you what got built. It rarely tells you what the candidate personally decided, what they gave up when the budget moved, or how they handled a contractor who said the detail couldn’t be built. Those are the things that decide whether a hire works out, and they only come out […]

The best benefits specialist interview questions test four areas: compliance knowledge (COBRA, ERISA, ACA, HIPAA), program administration (open enrollment, vendors, HRIS), employee communication and judgment in sensitive situations. Ask for specific examples, then confirm the skills with a short job based skill test before the final round. A benefits specialist is the person employees call […]

Underwriters review applications, whether for insurance policies or loans, and decide how much risk a company should take on. Get a clear snapshot of how to screen the ideal candidate for your organization with this set of underwriter interview questions. The job of an underwriter is to review insurance or loan applications and carry out […]