Full Stack Developer Interview Questions & Answers
Core Java
Q: What are the basic OOP principles?
A: The four OOP principles are:
- Encapsulation: Wrapping data and methods into a single unit.
- Abstraction: Hiding implementation details and showing only functionality.
- Inheritance: Acquiring properties of a parent class.
- Polymorphism: Ability to take many forms, typically method overloading and overriding.
Q: Difference between `==` and `.equals()`?
A: `==` checks for reference equality (memory location). `.equals()` checks for value/content equality. For
example, two different String objects with the same characters return `true` for `.equals()` but `false` for `==`.
Spring Boot
Q: What is Spring Boot?
A: Spring Boot is a framework built on top of Spring that simplifies application development by providing
auto-configuration, embedded servers, and starter dependencies.
Q: What is the use of `@RestController`?
A: `@RestController` is a combination of `@Controller` and `@ResponseBody`. It is used to build REST APIs
where return values are directly written to the HTTP response as JSON/XML.
React JS
Q: What is Virtual DOM?
A: Virtual DOM is a lightweight in-memory representation of the actual DOM. React uses it to detect changes
and update the real DOM efficiently via a diffing algorithm.
Q: What are Hooks in React?
A: Hooks are functions that let you use state and other React features without writing a class. Common
hooks: `useState`, `useEffect`, `useContext`, `useRef`, etc.
Full Stack Developer Interview Questions & Answers
SQL & JPA
Q: What is an INNER JOIN?
A: An INNER JOIN returns records that have matching values in both tables involved in the join.
Q: What is the N+1 problem in JPA?
A: It occurs when fetching a list of entities, and for each entity, another query is executed to fetch its related
data. This results in N+1 queries. Solution: Use `@EntityGraph` or `JOIN FETCH`.
REST API
Q: What is REST?
A: REST (Representational State Transfer) is an architectural style that uses standard HTTP methods to
perform CRUD operations over web services.
Q: Difference between PUT and POST?
A: `PUT` is idempotent and used to update/create a resource at a known URI. `POST` is non-idempotent and
used to create a resource under a collection.