Java Full Stack Developer Interview Questions & Answers
40 questions for Java Full Stack Developer interviews — 26 easy, 14 medium.
About the Java Full Stack Developer role
A Java full stack developer builds features end to end, from database tables and Spring Boot REST APIs to React screens. Day to day work includes writing services and repositories, securing endpoints, building responsive UI components, writing tests and fixing bugs across layers. This is the most common hiring title for this course in Indian IT services firms and product companies, with fresher and experienced openings.
You are passing the same user prop through five levels of components. What would you do?
Show answer
What is React and what is the virtual DOM?
Show answer
How do you handle a Git merge conflict when working in a team?
Show answer
What is the difference between WHERE and HAVING?
Show answer
In a bidirectional @OneToMany relationship, what does mappedBy mean?
Show answer
Return only a few columns using an interface-based projection.
Show answer
Explain the architecture of your last full stack project end to end.
Show answer
What is the difference between DELETE, TRUNCATE and DROP?
Show answer
Why does React need a key prop when rendering lists?
Show answer
Create a scheduled job that runs every night at 2 AM in Spring Boot.
Show answer
Build a login form with basic validation in React.
Show answer
Write a query to find duplicate email addresses in a users table and delete the extra rows.
Show answer
What are ACID properties?
Show answer
Write a JPA entity for a Product with an auto-generated ID and basic constraints.
Show answer
Write CSS for a product grid that shows 1 column on mobile, 2 on tablet and 4 on desktop.
Show answer
Explain the different types of SQL joins.
Show answer
After calling setCount(count + 1), console.log(count) still shows the old value. Why?
Show answer
What is normalization? Explain 1NF, 2NF and 3NF.
Show answer
What is the difference between a primary key and a unique key?
Show answer
How do you take feedback from a senior on your React code?
Show answer
Why are semantic HTML and accessibility important?
Show answer
What is the difference between persist and merge, and between save and saveAndFlush?
Show answer
Write a unit test for a service method using JUnit 5 and Mockito.
Show answer
Use map, filter and reduce to get the total value of in-stock products.
Show answer
What causes LazyInitializationException and how do you fix it properly?
Show answer
Write a query to find the second highest salary from an employees table.
Show answer
How do derived query methods work in Spring Data JPA?
Show answer
Implement a cart counter using useReducer.
Show answer
What is Spring Boot and how is it different from the Spring Framework?
Show answer
What is the biggest full stack project you have built?
Show answer
What is the difference between lazy and eager fetching?
Show answer
Explain Inversion of Control and Dependency Injection.
Show answer
Why is constructor injection preferred over field injection?
Show answer
What is the difference between JPA, Hibernate and Spring Data JPA?
Show answer
Your component keeps re-rendering in an infinite loop after calling an API. What is wrong?
Show answer
How do you store user passwords securely in Spring Boot? Show the code.
Show answer
You need H2 for local development, MySQL for testing and PostgreSQL in production. How do you configure this?
Show answer
The application fails with NoSuchBeanDefinitionException for a service. How do you debug it?
Show answer
What is a custom hook and why would you write one?
Show answer
Frequently asked questions
What does a Java Full Stack Developer do?
A Java full stack developer builds features end to end, from database tables and Spring Boot REST APIs to React screens. Day to day work includes writing services and repositories, securing endpoints, building responsive UI components, writing tests and fixing bugs across layers. This is the most common hiring title for this course in Indian IT services firms and product companies, with fresher and experienced openings.
Which skills are tested in a Java Full Stack Developer interview?
Expect questions on Spring Boot REST APIs, React hooks, JPA entity mapping, SQL queries, Git and code review. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a Java Full Stack Developer interview?
Revise Spring Boot, React Frontend, JPA and Hibernate, SQL and Databases first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.