Interview practice

Java Backend Developer

2–5 years · Mid — Java · Spring Boot · REST APIs · JPA / Hibernate · SQL · Microservices

0–2 years 2–5 years 5–8 years 8+ years
scenario API versioning 1 of 6
You are asked to support a new feature in your REST API that requires breaking changes to the existing endpoints. How do you approach this while ensuring backward compatibility?
What a strong answer covers

Identifies the need for versioning strategy; discusses using URL path versioning or header-based versioning; considers impact on clients and documentation; plans for deprecation schedule for old versions; ensures thorough testing for both old and new versions.

The follow-up you would get

How do you communicate these changes to the stakeholders and clients affected by the breaking changes?

Could you have answered that?
technical JVM behaviour 2 of 6
Under heavy load, your application shows increased garbage collection pauses, affecting response times. How do you analyse the situation, and what are your initial steps to alleviate it?
What a strong answer covers

Examines GC logs to determine the frequency and duration of pauses; evaluates heap size and memory allocation patterns; considers tuning the garbage collection algorithm; checks for memory leaks or excessive object creation; uses monitoring tools to visualise memory usage over time.

The follow-up you would get

You find that your application is not leaking memory. What else could cause GC pauses?

Could you have answered that?
technical API design 3 of 6
You need to design a REST API endpoint to fetch user details with optional filtering by status and role. What design considerations do you take into account, and how do you implement this?
What a strong answer covers

Defines clear and concise URI structure; uses query parameters for optional filters; ensures proper use of HTTP methods and status codes; considers pagination for large datasets; documents the API with examples and expected responses.

The follow-up you would get

You decide to implement pagination. How do you handle sorting on the results?

Could you have answered that?
ownership A feature you owned end to end 4 of 6
Describe a feature you developed from start to finish, including the design decisions and trade-offs you made.
What a strong answer covers

Names the feature and its purpose; details design choices such as technology selection and architecture; explains the trade-offs, including performance and maintainability; discusses testing strategies and how user feedback was incorporated; reflects on the deployment process and its challenges.

The follow-up you would get

What would you change about your approach if you had to do it again?

Could you have answered that?
ownership A disagreement with a team member 5 of 6
Can you recount a time when you disagreed with a team member about a technical choice? What was the outcome?
What a strong answer covers

Describes the context of the disagreement and the specific choice in question; explains the rationale behind their position and the opposing view; discusses how the discussion was approached and resolved; reflects on the final decision and its impact on the project; avoids personal criticism.

The follow-up you would get

What did you learn from this experience?

Could you have answered that?
scenario Concurrency issues 6 of 6
You discover that users are experiencing inconsistent results when accessing a shared resource in a microservice. What is your approach to identify and resolve this concurrency issue?
What a strong answer covers

Analyzes the code for shared mutable state; implements locking mechanisms or uses optimistic locking; reviews transaction isolation levels; considers introducing a message queue for state changes; tests for race conditions.

The follow-up you would get

If you implement a locking mechanism, how do you ensure it does not introduce significant performance bottlenecks?

Could you have answered that?
That is this set.

Load six more — you will get questions you have not seen first.

Give me six more →

Say your answer out loud before revealing. Reading the answer first feels like learning and is not.