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, and for the neighbouring role, 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
1. A service's memory climbs for hours, then it restarts. Where do you start?
- Follow up with
- What would the heap tell you?
- Listen for
- 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?
- Follow up with
- When is an atomic variable not enough?
- Listen for
- Lost updates and visibility. Atomic against lock, and why a check-then-act sequence still needs one.
3. Why override equals and hashCode together?
- Follow up with
- What breaks if a mutable field is part of the hash?
- Listen for
- The contract. A key that "disappears" from a HashMap. A preference for immutable keys.
Group 2: Concurrency and speed
4. A thread pool is full and requests queue up. What do you check?
- Follow up with
- How would you size it?
- Listen for
- 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?
- Follow up with
- What if the profiler shows nothing in your code?
- Listen for
- 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?
- Follow up with
- When have parallel streams made things worse?
- Listen for
- Workload size, shared state, blocking work in the common pool. Measures.
Group 3: Frameworks and data
7. One Spring endpoint runs hundreds of queries. What is happening?
- Follow up with
- How do you fix it without loading everything?
- Listen for
- 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?
- Follow up with
- What would you check if a rollback did not happen?
- Listen for
- 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?
- Follow up with
- How do you roll it back?
- Listen for
- Expand then contract. Backward-compatible migrations, a migration tool, deploy order.
Group 4: Design and failure
10. A downstream API returns errors for ten minutes. What should your service do?
- Follow up with
- What would you not retry?
- Listen for
- 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?
- Follow up with
- Where does it break?
- Listen for
- 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?
- Follow up with
- What did a split cost you?
- Listen for
- Team boundaries, data ownership, deploy independence, operating cost. A real example.
Group 5: Testing and ownership
13. What do you cover with unit tests, and what with integration tests?
- Follow up with
- Which test do you trust least?
- Listen for
- 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.
- Follow up with
- What did you change afterwards?
- Listen for
- 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?
- Follow up with
- What do you do when a dependency has a security flaw?
- Listen for
- 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.

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. 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.
- 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.
- 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.

Your engineers can open the recording and the transcript behind each answer before they decide.
Keep three decisions with your engineers
- Who moves forward: a senior Java engineer reads the report and decides; Tracy supplies the quotes and the engineer supplies the verdict.
- 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.
- 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. 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.
Common questions
What are good Java developer interview questions and answers?
What Java questions suit a candidate with 10 years of experience?
What Java questions suit 5 years of experience?
What Java questions suit 3 years of experience?
Can Tracy draft the interview from my Java job description?
Does Tracy decide who to hire?
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 (opens in a new tab) Book a demo (opens in a new tab)
Your first 3 results are free. No card needed.
Sources
- Tracy AI Interviewer home page, retrieved 14 Nov 2026.
- Tracy AI Interviewer pricing, retrieved 14 Nov 2026.
- Tracy AI Interviewer Connect page, retrieved 14 Nov 2026.



