What should Java developer screening questions test?
Java developer screening questions should test the candidate's own work: a system they built, a problem they fixed with numbers, and code the role needs. Trivia such as the difference between the JDK and the JRE can be looked up or recited, so it tells a recruiter little in a first round.
The screening questions for recruiters, by role cover other roles. This guide takes the Java developer.
Start with the client's job description, because "Java developer" means different jobs. Some roles build backend APIs only. Some are full stack, with React or Angular on top. Some also run the platform underneath: Kubernetes, AWS, the CI/CD pipeline. The questions follow that split, and a platform-heavy job description needs platform questions as well as Java ones.
For most Java roles, the first round tests six things:
- what they built, and which parts they owned;
- a performance problem, with the time before and after;
- the data layer: SQL, indexes, the schema;
- how code gets from a merge to production;
- how they work with other teams when something breaks;
- a short piece of code.
You don't need to judge the Java to judge the answer. A specific answer names the system, the cause, the change and the measured result. A generic one names none of them.
Which Java developer screening questions should you ask?
Ask seven or eight questions: one or two knockout questions on the client's hard conditions, five about the candidate's own work, and one short code question. Write next to each question what a strong answer contains before anyone answers, so every candidate is judged against the same words.
Knockout questions
A knockout question checks a condition the client won't bend. Write the condition into the question, so the answer can't be a bare yes to something nobody stated.
- Notice period, when the client has a hard limit. Put the client's limit in the question: "The client needs someone to join within this many days. Can you?"
- Office city and days, if the role is on-site, or the working hours, if the team is remote across time zones.
- Years with a named stack, only when the client's job description sets a minimum, such as five years with Java. Otherwise, ask and don't gate on it.
- CTC ceiling, only when the client has one.
Java interview questions for recruiters who don't write Java
The set below covers the work after the knockout. Each row says what a strong answer contains, in words you can check without reading code. For code you can't read, technical screening for non-technical recruiters sets out how to judge it.
| # | Question | What a strong answer shows |
|---|---|---|
| 1 | The client's notice period or office condition, stated in full | A clear yes to the condition as written |
| 2 | "Walk us through one application you built end to end. What did you own in the Java backend, the front end and the database?" | The parts they owned by name, how they fit together, and a result with a number |
| 3 | "Tell us about a slow query or page you fixed. What did you measure, what did you change, and what was the time before and after?" | A diagnosis step, a specific change such as an index or a rewritten query, and times before and after |
| 4 | "How does your code get from a merge to production?" | Named stages (build, tests, scan, deploy), who approves, and how they roll back |
| 5 | "Tell us about a production incident you worked on with other teams. What did you do first?" | Restore service first, then the cause, then the fix and what changed after, and how others were kept informed |
| 6 | "When speed, scale and security pulled against each other, what did you choose and why?" | A real example, the limit they set, and what would make them revisit it |
| 7 | "Write a Spring Boot endpoint that returns a customer's 20 most recent orders with their line items, in as few database queries as you can, with a unit test." | The sorting and the limit done in SQL rather than in a loop, an index proposed, an unknown customer handled, and a test of behaviour |
Source: questions written for this guide · not a ranking
The code question goes last and stays short. The client's technical round can go deeper. Decide before you send it whether the candidate may use an AI assistant; AI-assisted coding interviews covers when to allow AI and how to judge the code.
The right-hand column is the start of a scorecard. Turning it into a weighted interview scorecard is the next step: each skill gets a weight and a 1–5 scale with words for each level.
How do you judge a Java answer if you don't write Java?
Judge how specific the answer is: a strong Java answer names the system, the cause, the change and a measured result, and a weak one stays general. A recruiter can check those four things without reading code, and can ask once for whichever is missing. Whether to ask that follow-up or move on is your call.
Look for numbers with units. An answer that gives the time before and after, in seconds or milliseconds, can be checked. "It made things faster" can't.
Listen for "we" and "I". A team built the system; ask what this candidate did in it.
Then compare the CV with the answer. A CV that lists a large platform and many years, beside an answer with no example in it, is two pieces of evidence that don't agree. Ask the follow-up before you decide which one to believe.
For code you can't read, check three things:
- the answer is in the files the question asked for;
- there is a test;
- the candidate says in a comment what they would index or change, and why.
The engineering judgement belongs to whoever reads the code next, a person or a tool. Your job in the first round is to see that the work is there.
When should a Java screen skip the code question?
Skip the code question in a Java screen when you approached the developer yourself, when the client's engineers run their own Java coding round next, or when the role is an architect or engineering manager. A headhunted senior Java engineer hasn't applied, so a call asks less of them than writing a Spring Boot endpoint does.
It is also the wrong step for:
- architects and engineering managers, where questions 2 to 6 matter more and the client can test code later;
- a client whose engineers run a live or pair-programming Java round next, which the screen's code question would repeat.
When you do ask it, keep it the size of question 7: one endpoint, its query and one test. Tell the candidate roughly how long it should take.
Anything bigger, such as a task across several files with deployment manifests and a pipeline, is a later-stage step, outside a first-round screen.
What to set in that later step, how to score it and what the brief should tell the candidate are in take-home assignments for developers.
How Recagn does this
Recagn is our product. We ran a senior Java role through it: Recagn drafted the rubric and seven questions from the job description, and we added one code question and one take-home. The four candidates are invented, and their answers, code and take-home files were written for this example. Recagn scored them on 17 Nov 2026.
What the run was
The role is a senior Java full stack and platform engineer: remote, five or more years, enterprise software. Recagn drafted the scorecard, which Recagn calls a rubric, from the job description.
The rubric has four hard gates (a knockout question is what Recagn calls a hard gate): 5+ years of senior engineering experience, hands-on Java full stack, platform and DevOps experience, and being able to work remotely. It weights six criteria, each with words for every score from 1 to 5: Java full-stack development 25%, AWS & infrastructure as code 20%, Containers & platform engineering 20%, Linux administration & CI/CD 15%, Databases & SQL 10%, and Collaboration & stakeholder management 10%.
We added two questions. One is a code question, where candidates write code answers (not run) in an editor across several files. The other is a take-home answered as a Document: up to five uploaded files with the Kubernetes manifests, a Terraform outline, the GitLab CI/CD pipeline and a README with the rollout plan, rough monthly cost and trade-offs. Here is how a code question works in a Recagn interview.
One candidate's code answer
Open a file to read the code. Recagn reads it without running it and scores the criteria the question is linked to; each reason also draws on his other answers.
Rohan D. Recommendation: Qualified
Code answer (not run)
Write the Java code for GET /customers/{id}/orders: it returns the customer's 20 most recent orders with their line items, in as few database queries as you can. Use Spring Boot with JDBC or JPA, as you prefer. Include a unit test, and say in a comment how you would index the tables.
4 of 10 files · Java
OrderController.java Java
package com.example.orders;
import java.util.List;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class OrderController {
private final OrderQueries queries;
public OrderController(OrderQueries queries) {
this.queries = queries;
}
@GetMapping("/customers/{id}/orders")
public ResponseEntity<List<OrderView>> recentOrders(@PathVariable long id) {
if (!queries.customerExists(id)) {
return ResponseEntity.notFound().build();
}
return ResponseEntity.ok(queries.recentOrders(id, 20));
}
}
OrderQueries.java Java
package com.example.orders;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Repository;
/**
* Two queries, whatever the order count: the 20 orders, then all their line items in one IN.
* A single JOIN with LIMIT would cut items, not orders, so the limit runs on orders alone.
*
* Indexes:
* CREATE INDEX orders_customer_recent ON orders (customer_id, created_at DESC, id DESC);
* -- the WHERE and ORDER BY walk this index; no sort, stops after 20 rows
* CREATE INDEX order_items_order ON order_items (order_id);
* -- the IN lookup; add (order_id, id) if item order matters on large orders
*/
@Repository
public class OrderQueries {
private final NamedParameterJdbcTemplate jdbc;
public OrderQueries(NamedParameterJdbcTemplate jdbc) {
this.jdbc = jdbc;
}
public boolean customerExists(long customerId) {
Boolean exists = jdbc.queryForObject(
"SELECT EXISTS (SELECT 1 FROM customers WHERE id = :id)",
Map.of("id", customerId), Boolean.class);
return Boolean.TRUE.equals(exists);
}
public List<OrderView> recentOrders(long customerId, int limit) {
Map<Long, OrderView> orders = new LinkedHashMap<>();
jdbc.query("""
SELECT id, status, total_paise, created_at
FROM orders
WHERE customer_id = :customerId
ORDER BY created_at DESC, id DESC
LIMIT :limit
""",
new MapSqlParameterSource("customerId", customerId).addValue("limit", limit),
rs -> {
long id = rs.getLong("id");
orders.put(id, new OrderView(id, rs.getString("status"), rs.getLong("total_paise"),
rs.getTimestamp("created_at").toInstant(), new ArrayList<>()));
});
if (orders.isEmpty()) {
return List.of();
}
jdbc.query("""
SELECT order_id, sku, quantity, price_paise
FROM order_items
WHERE order_id IN (:ids)
ORDER BY order_id, id
""",
Map.of("ids", orders.keySet()),
rs -> {
orders.get(rs.getLong("order_id")).items().add(new OrderView.Item(
rs.getString("sku"), rs.getInt("quantity"), rs.getLong("price_paise")));
});
return List.copyOf(orders.values());
}
}
OrderView.java Java
package com.example.orders;
import java.time.Instant;
import java.util.List;
public record OrderView(long id, String status, long totalPaise, Instant createdAt, List<Item> items) {
public record Item(String sku, int quantity, long pricePaise) {}
}
OrderQueriesTest.java Java
package com.example.orders;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.jdbc.Sql;
/** Runs against a real PostgreSQL (Testcontainers, via the test profile), not mocks. */
@JdbcTest
@Import(OrderQueries.class)
@Sql("/orders-fixture.sql") // customer 1 with 25 orders of 2 items each; customer 2 with none
class OrderQueriesTest {
@Autowired OrderQueries queries;
@Test
void returnsTheTwentyMostRecentOrdersWithAllTheirItems() {
var orders = queries.recentOrders(1, 20);
assertThat(orders).hasSize(20);
assertThat(orders).isSortedAccordingTo((a, b) -> b.createdAt().compareTo(a.createdAt()));
assertThat(orders).allSatisfy(o -> assertThat(o.items()).hasSize(2));
}
@Test
void aCustomerWithNoOrdersGetsAnEmptyList() {
assertThat(queries.customerExists(2)).isTrue();
assertThat(queries.recentOrders(2, 20)).isEmpty();
}
@Test
void anUnknownCustomerDoesNotExist() {
assertThat(queries.customerExists(999)).isFalse();
}
}
- Java full-stack developmentweight 25%
Criterion score, from all his answers linked to it
Recagn's reason: Strong across Java (Spring Boot enterprise APIs with idempotency, versioning) and React (react-query, optimistic updates), with full-life-cycle ownership and measurable performance outcomes (14 min to <3 min). The code answer is clean, avoids N+1 with two batched queries, limits/orders in SQL, 404 for unknown customer, and a behaviour-focused Testcontainers test. Node.js experience is not explicitly shown, which is the main gap preventing a 5; otherwise this is near-expert depth.
- Databases & SQLweight 10%
Criterion score, from all his answers linked to it
Recagn's reason: Deep data expertise on a 40M-row table: diagnosis via EXPLAIN ANALYZE, functional and partial indexing, subquery-to-join rewrite with a dramatic measurable improvement (6s to 90ms), plus connection-pool tuning. Schema design (immutable versioned tables) and thoughtful composite-index reasoning in the code answer reinforce this. Matches level 5 for optimising enterprise databases for performance and scale. NoSQL is not demonstrated, but relational depth and the overall strength justify 5.
Rohan D.'s files keep the limit and the ordering in SQL and fetch the line items in a second query, not one query per order. Recagn's reasoning on Java full-stack development says the code "avoids N+1 with two batched queries, limits/orders in SQL, 404 for unknown customer, and a behaviour-focused Testcontainers test". Each criterion score draws on all of Rohan D.'s answers linked to it, not on the code alone.
The answer ladder: Databases & SQL
These are the rubric's words for each score on Databases & SQL, beside each candidate's answer to the performance-problem question. The score is for the criterion, and it rests on more than this one answer.
Databases & SQL (weight 10%), with each candidate's answer to "Share a database performance problem you diagnosed and fixed":
| Score | The rubric's words for that score | Candidate | Their answer, in part |
|---|---|---|---|
| 5 | "Deep data expertise; optimises enterprise databases for performance and scale across relational and NoSQL." | Rohan D. | "In PostgreSQL I ran EXPLAIN ANALYZE and saw a sequential scan on an orders table of about forty million rows … The query dropped from about 6 seconds to 90 milliseconds." |
| 4 | "Tunes queries and schemas and troubleshoots both relational and NoSQL systems." | Sneha K. | "With EXPLAIN ANALYZE I found a nested loop over a join with no index on claim_account_id. … The page went from timing out at thirty seconds to about 400 milliseconds." |
| 2 | "Writes everyday SQL; limited schema design or NoSQL." | Vikram S. | "I do not remember a specific schema change, but in general that is my approach, and it improves performance." |
| 1 | "Only basic CRUD SQL; no tuning." | Arjun M. | "Once a page was slow, and I think I added an index, but I am not sure which field." |
Source: Recagn worked example (Senior Java full stack and platform engineer), scored 17 Nov 2026 · candidates invented; answers written for this example
Each score rests on every answer linked to the criterion, not on the one quoted. Databases & SQL also draws on the end-to-end application question and the code question. For Vikram S., Recagn's reasoning reads: "The code answer's indexing comment is generic … and misses the fitting composite index (customer_id, created_at desc) the task implied."
Claims against evidence
Recagn's one-line summary of Vikram S. reads: "A strong platform/containers engineer with broad but claim-heavy, thinly-evidenced answers, let down by weak database depth and generic responses that keep most criteria at a solid 3."
Recagn's CV claim check treats every claim on the CV as unproven until an interview answer backs it. For Vikram S. it recorded 1 contradiction, 9 inflations and 5 corroborations. For Rohan D. it recorded 0, 3 and 15.
The take-home files get read against the criteria too. Vikram S. scored 3 on AWS & infrastructure as code, and Recagn's reasoning, which also draws on his AWS and trade-off answers, says: "The take-home Terraform is a bare EKS cluster stub with an empty RDS module reference and, critically, a hardcoded DB_PASSWORD 'changeme' in the manifest, which is a serious security lapse contradicting a mature IaC discipline." The candidates uploaded 5, 3, 2 and 1 files (Rohan D., Sneha K., Vikram S., Arjun M.), and Recagn's reasoning cites the take-home for the first three.
Where they landed
Recagn recommends Qualified for Rohan D. (a weighted 4.40) and Maybe for Vikram S. (3.10), against the rubric's lines of 3.8 for Qualified and 3 for Maybe. The totals are worked out from the criterion scores by the rule in how AI interview scoring works.
The gates decide the other two. Recagn's reason for Sneha K. ends "failing three of four gates", and for Arjun M. it says he "fails all technical gates". Recagn recommends Disqualified for both.
Sneha K. scored 4 on Databases & SQL, above Vikram S.'s 2, and still gets Disqualified. Her reason names the "infrastructure, cluster-administration, Linux, and Terraform ownership this platform-engineering role requires". That is why the first step is reading the job description: a strong Java developer can be the wrong fit for a platform role.
Drafting the rubric and the questions from the client's job description, reading every answer and file, and scoring each criterion with its reasons come off your plate. What the role needs, whether it gets a code question, and who goes to the client stay yours. Recagn recommends. Only you can reject a candidate.
Questions people ask
Can a candidate paste ChatGPT's code into a Recagn interview?
They can paste it, and you see the paste. In a Recagn interview, pastes into the code editor are tracked with the file name and shown in your interview review, and Recagn reads each answer, code included, for signs it was written by AI. Both sit beside the score, never in it, and you decide whether they matter. When pastes become a flag is set out in the Integrity rules. The questions above also ask about the candidate's own systems and numbers, which a follow-up tests.
How is a Recagn code question different from an iMocha Java test?
iMocha's guide for HR teams groups more than 90 Java questions by years of experience, such as "What is the difference between JDK, JRE, and JVM?", and recommends its online Java tests (iMocha, checked 17 Nov 2026). Recagn asks a code question inside the first-round interview and reads the code (not run) against the role's rubric, beside the candidate's other answers.
What does a Java screening interview with a code question cost on Recagn?
One credit if no answer is video and webcam proctoring is off: at most ₹50 on Starter before GST (₹49.98; ₹58.98 with 18% GST). The code question and an uploaded take-home add no credits; a video answer makes the interview three credits, at most ₹150. These are ceilings, because the plan's price also covers CV reads.
Should a recruiter ask Java theory questions like JDK versus JRE?
Not in the first round. Theory answers are easy to look up and recite, so they rank memory, not work. One question about a problem the candidate fixed, with the numbers, tells you more. Leave theory to the client's technical round if they want it.