Java Developer Assessment Template

A ready-to-run Java hiring test covering modern language features, concurrency, JVM internals, and Spring Boot patterns.

Duration
75 minutes
Questions
10
Level
Mid-Level
Passing Score
70%

What this template measures

Every skill needed for a java developer hire, covered across MCQ, coding, and essay questions.

Modern Java

Records, pattern matching, sealed classes, virtual threads.

Concurrency

Virtual threads vs platform threads, CompletableFuture, synchronization.

JVM Internals

Memory model, GC basics, class loading.

Spring Boot

DI, configuration, REST, data JPA, security.

Streams API

Collectors, lazy evaluation, performance pitfalls.

Testing

JUnit 5, Mockito, integration testing patterns.

Sample questions from this template

A preview of the questions you'll see when you use this template.

Multiple ChoiceMediumQuestion 1

Which is true about Java virtual threads (Project Loom)?

  • A.They replace platform threads for all use cases
  • B.They're lightweight and scheduled by the JVM, good for blocking I/O at scale
  • C.They require a reactive runtime like Netty
  • D.They only work on GraalVM
CodingMediumJava 21Question 2

Implement `record UserDto(UUID id, String name, Instant createdAt)` with: - Static factory `fromEntity(UserEntity entity)` - Validation on name (1-100 chars, non-null) - Canonical constructor throwing IllegalArgumentException on invalid input

CodingHardJava 21Question 3

Build a Spring Boot controller `POST /api/tasks` that: - Accepts a JSON body with validation (@Valid) - Persists via JpaRepository - Returns 201 with Location header on success - Returns 422 with per-field errors on validation failure

EssayHardQuestion 4

Compare synchronized, ReentrantLock, and StampedLock. Provide one concrete scenario where each is the right choice.

Scoring rubric

How candidates are evaluated on this template.

Dimension
Description
Weight
Correctness
Passes test cases and handles edge cases.
40%
Modern Java Idiom
Uses records, pattern matching, streams idiomatically.
20%
Spring Boot Fluency
Correct use of DI, validation, data layers.
20%
Concurrency Correctness
Handles synchronization and async correctly.
10%
Code Quality
Readability, structure, and testing.
10%

Frequently asked questions

Which JDK version does this template use?+

Java 21 LTS by default. Variants for Java 17 LTS available if you need compatibility with older stacks.

Can I customize this template?+

Yes. Every question, time limit, weighting, and rubric dimension is fully editable. Use the template as a starting point and tailor it to your role and seniority level.

Does this template include AI cheat detection?+

Yes. All ClarityHire assessment templates ship with code coherence AI, keystroke biometrics, and paste detection enabled by default. You can dial integrity level per role.

Can candidates see sample questions before starting?+

Yes. Each template supports unscored practice questions so candidates warm up before the real assessment begins. That way you measure skill, not test anxiety.

Launch Your Java Assessment Today

Customize this template and invite candidates in minutes.