Backend Java Developer Interview Questions

517 backend java developer interview questions shared by candidates

How can you identify issues in a database query? How to interpret the query execution plan, how can you tell that it is using indexes or not? What algorithms do database indexes use? In addition to b-tree, what other algorithm is used by db indexes? What is the difference between hash based indexes and b-tree? When to use them? Trade-offs? If even after solving the issues with indexes, how can you improve the performance of the database? How would you solve concurrency issues with database transactions? How to use pessimistic lock? What are the isolation levels? What would be the best isolation level to solve the issue with money transfer coding exercise? What is exactly the isolation level repeatable read, serializable, read committed, and other questions related to the same topic...... How would you create partitions in a database (which approach would you use)? What are the tradeoffs of db partitions (sharding)? If even after sharding, you still have problems with performance, what would you do? Some questions about event sourcing, that I don't recall anymore.. What is CQRS, how to implement it? There were also some questions about availability like, if a write database is down, what would be the impacts if it is down for a long period of time? (Guess what the answer was? Because of locks in their upstream systems….) So, seems like they prefer pessimistic concurrency control and synchronized blocks.
avatar

Java Backend Engineer

Interviewed at Revolut

4
Apr 28, 2021

How can you identify issues in a database query? How to interpret the query execution plan, how can you tell that it is using indexes or not? What algorithms do database indexes use? In addition to b-tree, what other algorithm is used by db indexes? What is the difference between hash based indexes and b-tree? When to use them? Trade-offs? If even after solving the issues with indexes, how can you improve the performance of the database? How would you solve concurrency issues with database transactions? How to use pessimistic lock? What are the isolation levels? What would be the best isolation level to solve the issue with money transfer coding exercise? What is exactly the isolation level repeatable read, serializable, read committed, and other questions related to the same topic...... How would you create partitions in a database (which approach would you use)? What are the tradeoffs of db partitions (sharding)? If even after sharding, you still have problems with performance, what would you do? Some questions about event sourcing, that I don't recall anymore.. What is CQRS, how to implement it? There were also some questions about availability like, if a write database is down, what would be the impacts if it is down for a long period of time? (Guess what the answer was? Because of locks in their upstream systems….) So, seems like they prefer pessimistic concurrency control and synchronized blocks.

Tech Interview Question- OOPS- Abstraction, Inheritance, Polymorphism, Encapsulation. Inheritance VS polymorphism types of polymorphirm overloading, overriding. function on both. Question on ternary operator SQL- Indexing DDL VS DML Normalisation vs denormalisation Sharding SQL queries todo. What to do when db can handle only 100 votes but 1000 are coming from bank. Explain the internship. DSA- Stacks vs Queues. explain Binary Search, time complexity. Merge sort- nlogn divide and conquer. Recursion- Explain, base cases. Work Sample Questions Explain the aproach for the problem statement, Scopes of improvements for project Why Javascript, How can project can handle the multiple inputs, JAVA vs JS, any online tool that does the same job What is nosql, what does DB offer(ACID), why a web application, what is a web app which works on mobile- responsive. Individual contributions, any question(can we change the role), more question on stroage of files. code related question on async js,promises, settimeout, how to fix it, use of global array. optimization, performance, handling huge data, getting out the right data.
avatar

Graduate Backend Developer - Java

Interviewed at BlueOptima

3.3
Jul 31, 2021

Tech Interview Question- OOPS- Abstraction, Inheritance, Polymorphism, Encapsulation. Inheritance VS polymorphism types of polymorphirm overloading, overriding. function on both. Question on ternary operator SQL- Indexing DDL VS DML Normalisation vs denormalisation Sharding SQL queries todo. What to do when db can handle only 100 votes but 1000 are coming from bank. Explain the internship. DSA- Stacks vs Queues. explain Binary Search, time complexity. Merge sort- nlogn divide and conquer. Recursion- Explain, base cases. Work Sample Questions Explain the aproach for the problem statement, Scopes of improvements for project Why Javascript, How can project can handle the multiple inputs, JAVA vs JS, any online tool that does the same job What is nosql, what does DB offer(ACID), why a web application, what is a web app which works on mobile- responsive. Individual contributions, any question(can we change the role), more question on stroage of files. code related question on async js,promises, settimeout, how to fix it, use of global array. optimization, performance, handling huge data, getting out the right data.

Core Java Difference between HashMap and ConcurrentHashMap Why is String immutable in Java? Difference between ArrayList and LinkedList Explain equals() vs hashCode() Difference between == and .equals() What happens when you use an object as a key in HashMap? Difference between checked and unchecked exceptions What is the difference between final, finally, and finalize()? Explain Java Memory Model (Heap, Stack, Metaspace) What causes memory leaks in Java? Difference between Comparable and Comparator What are immutable classes? How to create one? Explain method overloading vs overriding What is the use of volatile keyword? Difference between Runnable and Callable Explain synchronization and race conditions Difference between wait(), sleep(), and notify() What is deadlock? How do you prevent it? What are Java 8 Streams? Difference between map() and flatMap() Explain Optional in Java 8 Functional interfaces in Java What is lazy loading in streams? What is serialization/deserialization? What are marker interfaces? Multithreading & Concurrency How does thread pool work? What is ExecutorService? Explain CompletableFuture Difference between parallel stream and normal stream What is atomicity? Explain CountDownLatch vs CyclicBarrier What are concurrent collections? Spring Boot What happens internally when Spring Boot application starts? Explain dependency injection Difference between @Component, @Service, @Repository Difference between constructor and field injection What is Spring Bean lifecycle? Explain @Autowired Difference between @RestController and @Controller What is @Transactional? What is AOP in Spring? Explain profiles in Spring Boot How do you handle exceptions globally? What is Spring Security? How JWT authentication works? Difference between monolith and microservices How do microservices communicate? What is API Gateway? What is service discovery? Explain circuit breaker pattern What is Feign Client? Difference between PUT and PATCH Hibernate / JPA Difference between save() and persist() Explain lazy vs eager loading What is N+1 query problem? Difference between get() and load() What are cascading types? What is first-level cache? Difference between JPQL and native query Explain entity lifecycle states SQL & Database Difference between WHERE and HAVING Explain joins with examples Difference between clustered and non-clustered index What is normalization? What are ACID properties? Explain transactions Difference between DELETE, DROP, and TRUNCATE How to optimize slow queries? What is indexing? Microservices & System Design How do you secure microservices? How do you handle distributed transactions? What is idempotency? Explain Kafka basics What happens if one microservice is down? How do you monitor microservices? What is rate limiting? Explain caching strategies Redis use cases Design a URL shortener / notification service Coding Questions Often Asked Reverse a string without using built-in methods Find duplicate elements in array Find first non-repeated character Check palindrome LRU Cache implementation Producer-consumer problem Sort employees by salary using streams Group strings by length using streams Find second highest number Detect cycle in linked list Scenario-Based Questions (Very Important) Production issue due to high CPU — how will you debug? API response became slow after deployment — approach? Database connections exhausted — what could be wrong? How did you improve performance in your project? Explain one challenging bug you solved How do you handle backward compatibility in APIs? How do you deploy safely in production? For 3–5 years experience, interviewers focus heavily on: real project experience debugging ability concurrency basics API design Spring Boot internals database optimization communication/confidence
avatar

Java Backend Developer/Engineer

Interviewed at T-Systems

3.8
May 28, 2026

Core Java Difference between HashMap and ConcurrentHashMap Why is String immutable in Java? Difference between ArrayList and LinkedList Explain equals() vs hashCode() Difference between == and .equals() What happens when you use an object as a key in HashMap? Difference between checked and unchecked exceptions What is the difference between final, finally, and finalize()? Explain Java Memory Model (Heap, Stack, Metaspace) What causes memory leaks in Java? Difference between Comparable and Comparator What are immutable classes? How to create one? Explain method overloading vs overriding What is the use of volatile keyword? Difference between Runnable and Callable Explain synchronization and race conditions Difference between wait(), sleep(), and notify() What is deadlock? How do you prevent it? What are Java 8 Streams? Difference between map() and flatMap() Explain Optional in Java 8 Functional interfaces in Java What is lazy loading in streams? What is serialization/deserialization? What are marker interfaces? Multithreading & Concurrency How does thread pool work? What is ExecutorService? Explain CompletableFuture Difference between parallel stream and normal stream What is atomicity? Explain CountDownLatch vs CyclicBarrier What are concurrent collections? Spring Boot What happens internally when Spring Boot application starts? Explain dependency injection Difference between @Component, @Service, @Repository Difference between constructor and field injection What is Spring Bean lifecycle? Explain @Autowired Difference between @RestController and @Controller What is @Transactional? What is AOP in Spring? Explain profiles in Spring Boot How do you handle exceptions globally? What is Spring Security? How JWT authentication works? Difference between monolith and microservices How do microservices communicate? What is API Gateway? What is service discovery? Explain circuit breaker pattern What is Feign Client? Difference between PUT and PATCH Hibernate / JPA Difference between save() and persist() Explain lazy vs eager loading What is N+1 query problem? Difference between get() and load() What are cascading types? What is first-level cache? Difference between JPQL and native query Explain entity lifecycle states SQL & Database Difference between WHERE and HAVING Explain joins with examples Difference between clustered and non-clustered index What is normalization? What are ACID properties? Explain transactions Difference between DELETE, DROP, and TRUNCATE How to optimize slow queries? What is indexing? Microservices & System Design How do you secure microservices? How do you handle distributed transactions? What is idempotency? Explain Kafka basics What happens if one microservice is down? How do you monitor microservices? What is rate limiting? Explain caching strategies Redis use cases Design a URL shortener / notification service Coding Questions Often Asked Reverse a string without using built-in methods Find duplicate elements in array Find first non-repeated character Check palindrome LRU Cache implementation Producer-consumer problem Sort employees by salary using streams Group strings by length using streams Find second highest number Detect cycle in linked list Scenario-Based Questions (Very Important) Production issue due to high CPU — how will you debug? API response became slow after deployment — approach? Database connections exhausted — what could be wrong? How did you improve performance in your project? Explain one challenging bug you solved How do you handle backward compatibility in APIs? How do you deploy safely in production? For 3–5 years experience, interviewers focus heavily on: real project experience debugging ability concurrency basics API design Spring Boot internals database optimization communication/confidence

Viewing 331 - 340 interview questions

Glassdoor has 517 interview questions and reports from Backend java developer interviews. Prepare for your interview. Get hired. Love your job.