Interview practice

Java Backend Developer

0–2 years · Junior — Java · Spring Boot · REST APIs · JPA / Hibernate · SQL · Microservices

0–2 years 2–5 years 5–8 years 8+ years
ownership A decision that impacted performance 1 of 6
Describe a time when you made a performance-related decision that was later proven to be ineffective. What did you learn?
What a strong answer covers

Identifies a specific decision about performance tuning; explains the metrics used to gauge effectiveness; describes how it was monitored over time; outlines the corrective actions taken and the impact; avoids attributing blame to others.

The follow-up you would get

What would you change in your approach to performance testing now?

Could you have answered that?
scenario Caching Problem 2 of 6
You notice that a frequently accessed API is serving stale data despite having a caching mechanism in place. What steps do you take to troubleshoot?
What a strong answer covers

Inspects the caching layer configuration for expiry settings; checks cache hit/miss ratios to evaluate effectiveness; examines data update patterns to ensure cache invalidation is correctly implemented; reviews logs for cache-related errors.

The follow-up you would get

How do you redesign the caching strategy to ensure data freshness without sacrificing performance?

Could you have answered that?
scenario Data Integrity Issue 3 of 6
A user reports that data is missing from the database after a recent batch job ran. What steps do you take to investigate?
What a strong answer covers

Confirms the batch job's success status and logs; checks for any data transformation logic that could have filtered out records; investigates database transaction logs for any rollbacks; examines source data for completeness.

The follow-up you would get

You discover that the job processed duplicate data entries. How do you prevent this from occurring again?

Could you have answered that?
scenario Microservice Communication 4 of 6
One of your microservices is failing to communicate with another, resulting in cascading failures. What do you do in the first 15 minutes?
What a strong answer covers

Validates the service endpoint URLs and configurations; checks for network connectivity issues between services; verifies the health status of both microservices; inspects the logs for any error messages indicating the nature of the failure.

The follow-up you would get

The failing service has a recent deployment that might contain breaking changes. How do you handle this situation?

Could you have answered that?
technical Concurrency 5 of 6
You have a multi-threaded application where shared data is being updated incorrectly. How do you assess and address the concurrency issue?
What a strong answer covers

Identifies critical sections of code that manipulate shared data; reviews the use of synchronized blocks or locks; checks for race conditions in code logic; considers using atomic variables or concurrent collections; tests with thread contention scenarios to reproduce the issue.

The follow-up you would get

If synchronisation is not possible, what alternatives might ensure thread safety?

Could you have answered that?
technical Connection pooling 6 of 6
Your application is experiencing database connection timeouts under load. What diagnostic steps do you take?
What a strong answer covers

Monitors connection pool usage metrics; checks the maximum pool size configuration; reviews the number of active connections and idle connections; ensures proper release of connections after use; inspects for long-running queries that may be holding connections.

The follow-up you would get

What configuration changes could help alleviate connection timeout issues?

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.