# Java Developer Interview Questions for Hiring Teams

> Java developer interview questions for hiring teams: 15 questions with follow-ups, what to expect at 3, 5 and 10 years, and how to run them at volume.

- URL: https://tracyinterview.ai/blog/java-developer-interview-questions
- Published: 2026-11-16
- Author: Louis

> **In short** Tracy AI Interviewer drafts the questions from your Java job description, then follows up on each answer, so you hear how a developer debugs a leaking service, not only which frameworks are on the CV. Below are 15 Java developer interview questions with follow-ups, and a table of what to expect at 3, 5 and 10 years. Start with question 1: "A service's memory climbs for hours, then it restarts. Where do you start?" A result comes with the recording, the timestamped transcript and a written assessment per question, and your engineers decide.

Say you post a Java role and 250 applications arrive. Nearly every CV lists Spring Boot, Hibernate and microservices, and the CV cannot tell you who has chased a memory leak in production and who has completed a tutorial. Good Java developer interview questions ask what they did when a service restarted every few hours.

Engineering managers and recruiters hiring mid-level to senior Java developers can use these 15 Java developer interview questions as the first technical conversation, which runs 20 to 30 minutes. Coding and architecture are for a later round with your own engineers.

Tracy AI Interviewer can hold that first conversation with every applicant. Describe the Java role and she drafts the questions for you to edit; during the interview she asks about what the candidate has just said, such as what a heap dump would tell them. For the wider process, see [volume hiring with Tracy](https://tracyinterview.ai/use-cases/volume-hiring), and for the neighbouring role, [backend developer interview questions](https://tracyinterview.ai/blog/backend-developer-interview-questions).

## What should a Java developer interview test?

It should test how the candidate reasons about a running service: memory, threads, queries, failure and change. Syntax and library names come second.

## Fifteen Java developer interview questions, grouped by what they test

Take one or two from each group. Ask the follow-up once the first answer is complete. Decide what a strong answer contains before anyone joins.

### Group 1: Language and runtime

*Table 1: Language and runtime, with follow-ups and what a strong answer contains.*

| Ask | Follow up with | Listen for |
| --- | --- | --- |
| 1. A service's memory climbs for hours, then it restarts. Where do you start? | What would the heap tell you? | A heap dump and GC logs. Caches, static collections and listeners that never release. Measures before changing flags. |
| 2. Two threads update the same counter. What goes wrong, and how do you fix it? | When is an atomic variable not enough? | Lost updates and visibility. Atomic against lock, and why a check-then-act sequence still needs one. |
| 3. Why override equals and hashCode together? | What breaks if a mutable field is part of the hash? | The contract. A key that "disappears" from a HashMap. A preference for immutable keys. |

### Group 2: Concurrency and speed

*Table 2: Concurrency and speed, with follow-ups and what a strong answer contains.*

| Ask | Follow up with | Listen for |
| --- | --- | --- |
| 4. A thread pool is full and requests queue up. What do you check? | How would you size it? | Blocking calls, queue settings, a slow dependency. Sizes from measured wait time, not a guess. |
| 5. An endpoint is slow. How do you find out why? | What if the profiler shows nothing in your code? | A profiler or traces, then database calls, serialisation and waiting on pools. |
| 6. How do you decide between a parallel stream, an executor and plain loops? | When have parallel streams made things worse? | Workload size, shared state, blocking work in the common pool. Measures. |

### Group 3: Frameworks and data

*Table 3: Frameworks and data, with follow-ups and what a strong answer contains.*

| Ask | Follow up with | Listen for |
| --- | --- | --- |
| 7. One Spring endpoint runs hundreds of queries. What is happening? | How do you fix it without loading everything? | The N+1 pattern from lazy loading. Fetch joins, batch size, projections. Reads the SQL log. |
| 8. How does @Transactional behave when one method in a class calls another? | What would you check if a rollback did not happen? | Proxy-based, so a self-call bypasses it. Checked exceptions do not roll back by default. Propagation. |
| 9. How do you change a database schema shared by several services? | How do you roll it back? | Expand then contract. Backward-compatible migrations, a migration tool, deploy order. |

### Group 4: Design and failure

*Table 4: Design and failure, with follow-ups and what a strong answer contains.*

| Ask | Follow up with | Listen for |
| --- | --- | --- |
| 10. A downstream API returns errors for ten minutes. What should your service do? | What would you not retry? | Timeouts, bounded retries with backoff, a circuit breaker. Does not retry calls that are unsafe to repeat. |
| 11. After an order is saved, an email must go out exactly once. How do you design it? | Where does it break? | An outbox table or similar. At-least-once delivery with an idempotent consumer. |
| 12. How do you decide whether to split a service in two? | What did a split cost you? | Team boundaries, data ownership, deploy independence, operating cost. A real example. |

### Group 5: Testing and ownership

*Table 5: Testing and ownership, with follow-ups and what a strong answer contains.*

| Ask | Follow up with | Listen for |
| --- | --- | --- |
| 13. What do you cover with unit tests, and what with integration tests? | Which test do you trust least? | Logic against wiring. Real databases in containers. Flaky tests and the limits of mocks. |
| 14. Tell me about a production incident you were part of. | What did you change afterwards? | Their own role, the cause in plain words, an alert or test they added. |
| 15. How do you keep a Java service current on versions and dependencies? | What do you do when a dependency has a security flaw? | Regular upgrades, long-term support releases, dependency scanning. Priority set by exposure. |

## What to expect at 3, 5 and 10 years of experience

Match the question to the level; the same question gets a different answer at each.

*Table 6: What a good answer looks like by experience, as a writer's guide, not a standard.*

| Experience | Start with questions | A good answer sounds like |
| --- | --- | --- |
| About 3 years | 1, 2, 5 | Explains a cause and a fix in their own words from a project they worked on. |
| About 5 years | 4, 8, 10 | Names the trade-off without prompting and has been on call for what they describe. |
| 10 years or more | 11, 12, 15 | Talks about teams, cost and a decision they would reverse. |

## Weak and strong answers to the same questions

Three questions, each answered weakly and strongly.

*Table 7: Weak and strong answers to the same questions, written as examples.*

|  | Weak answer | Strong answer |
| --- | --- | --- |
| Question 1, the memory climb | "I'd increase the heap size." | "That only delays it. I'd take a heap dump, see which objects keep growing and find what holds them, often a cache with no limit." |
| Question 5, the slow endpoint | "I'd add caching." | "I'd turn on the SQL log first. If one request runs hundreds of queries, caching hides the problem and a fetch join fixes it." |
| Question 14, the incident | "The team fixed it quickly." | "I rolled back, then found a missing timeout. I added it and an alert on queue depth so we would see it before users." |

## A follow-up chain on the memory leak

Illustration only: sample data, a fictional candidate and no real interview behind it. The chain starts from question 1.

> **Tracy:** A service's memory climbs for hours, then it restarts. Where do you start? **Candidate (fictional):** I would raise the heap size first and watch it. **Tracy:** What would that tell you about the cause? **Candidate:** Nothing, it only delays the restart. I would take a heap dump and see which objects keep growing. **Tracy:** Say the dump shows a map that only grows. What do you look for? **Candidate:** A cache with no size limit, or a listener added on every request and never removed.

![Transcript card: memory climbs until a restart, candidate says raise the heap, Tracy asks what that would tell you.](/blog/images/java-developer-interview-questions-1.png)

*Tracy's second question follows the candidate's plan to raise the heap, so your engineers hear whether the leak was ever diagnosed. Illustration with sample data*

A second question built on the candidate's own answer shows whether they traced the leak or only raised a limit.

## Run the Java interview for every applicant

At 30 minutes each, a live call for all 250 applications to one Java role would take about 125 hours.

- Describe the Java role and Tracy drafts the questions; keep them, edit them or swap in your own. See [drafting questions from a job description](https://tracyinterview.ai/product). CV check is a setting.
- There is no account to create and no slot to book: a browser link works at any hour, and the join screen says the conversation is recorded and transcribed. See [the candidate's side of the interview](https://tracyinterview.ai/participant-experience).
- Each result comes with the recording, the transcript with timestamps, what was said to each question and the result fields. See [the fields in a report](https://tracyinterview.ai/blog/ai-interview-reports).
- If integrity signals are on, a reviewer sees what was captured: tab changes, gaze, face detection, delay before answers, fullscreen exits and external screens. Read the evidence before acting; a signal is not proof.

For the 250-application role above, the sum is short: $1 per credit, one credit per started 20 minutes of an interview that produced a result, and no seats. The first 3 results are free. See [pricing](https://tracyinterview.ai/pricing).

![Recreated Tracy result report for a fictional Java developer: recording, transcript and quoted evidence per question.](/blog/images/java-developer-interview-questions-2.webp)

*The recording and the transcript are there for the engineer who wants the exact words behind a summary line. Illustration with sample data*

Your engineers can open the recording and the transcript behind each answer before they decide.

## Keep three decisions with your engineers

1. Who moves forward: a senior Java engineer reads the report and decides; Tracy supplies the quotes and the engineer supplies the verdict.
2. Calibration: before you scale up, give a second engineer five transcripts to read cold. If the two of you disagree about who answered well, fix the questions first.
3. The coding round: reading and writing real code, and architecture review, stay with your team.

For four hires a year, a call with your own engineer is simpler; see [when a human call is enough](https://tracyinterview.ai/blog/ai-interview-vs-human-interview). Tracy becomes worth trying once applicants outnumber your engineers' hours. To try it, paste one open Java role and have an engineer read the first batch of results. For other stacks, see [software engineer interview questions](https://tracyinterview.ai/blog/software-engineer-interview-questions).

## Common questions

### What are good Java developer interview questions and answers?

Ask about memory, threads, queries, failure handling and incidents the candidate owned. Keep the follow-up beside each question; the "listen for" column lists what a strong answer contains.

### What Java questions suit a candidate with 10 years of experience?

Use the design and failure group and the dependency question. Ask for a decision they would reverse, what it cost and who they had to convince.

### What Java questions suit 5 years of experience?

Use the concurrency, framework and incident questions. Expect trade-offs named without prompting.

### What Java questions suit 3 years of experience?

Use the memory, counter and slow endpoint questions. Accept examples from one project and listen for a cause and a fix.

### Can Tracy draft the interview from my Java job description?

Yes. Describe the role and Tracy drafts the questions for you to edit, or you can bring your own list.

### Does Tracy decide who to hire?

No. Your engineers read what was said and decide.

---

**Create an interview for this role** Create an interview for this exact role and read the report. The first 3 results are free. [Try it free](https://tracyinterview.ai/connect?utm_source=blog&utm_medium=seo&utm_campaign=java-developer-interview-questions&utm_content=try-free) [Book a demo](https://cal.com/tracy-ai/tracy-demo-web?utm_source=blog&utm_medium=seo&utm_campaign=java-developer-interview-questions&utm_content=demo)

## Sources

- [Tracy AI Interviewer home page](https://tracyinterview.ai/), retrieved 14 Nov 2026.
- [Tracy AI Interviewer pricing](https://tracyinterview.ai/pricing), retrieved 14 Nov 2026.
- [Tracy AI Interviewer Connect page](https://tracyinterview.ai/connect), retrieved 14 Nov 2026.
