Java React Developer Interview Questions & Answers
Role: Java React Developer (5–10 Years)
Company: Java R&D Pvt. Ltd.
Location: India
==============================
CORE JAVA
==============================
Q1. What are OOP principles?
A: Encapsulation, Inheritance, Polymorphism, and Abstraction help build scalable and
maintainable applications.
Q2. Abstract class vs Interface?
A: Abstract classes allow shared code; interfaces define contracts and support multiple
inheritance.
Q3. What is an immutable object?
A: An object whose state cannot be changed after creation.
Q4. HashMap vs ConcurrentHashMap?
A: ConcurrentHashMap is thread-safe and suitable for multi-threaded applications.
Q5. How do you handle multithreading?
A: Using synchronization, ExecutorService, and thread-safe collections.
==============================
SPRING BOOT / HIBERNATE
==============================
Q6. Why Spring Boot?
A: Faster development with auto-configuration and embedded servers.
Q7. Dependency Injection?
A: Spring injects dependencies at runtime; constructor injection is preferred.
Q8. Global exception handling?
A: Using @ControllerAdvice.
Q9. JPA vs Hibernate?
A: JPA is a specification; Hibernate is its implementation.
Q10. Lazy vs Eager loading?
A: Lazy loading improves performance by fetching data only when needed.
==============================
REST & MICROSERVICES
==============================
Q11. What is REST?
A: Stateless, resource-based architecture using HTTP methods.
Q12. PUT vs PATCH?
A: PUT replaces entire resource; PATCH updates partial data.
Q13. API security?
A: JWT, HTTPS, Spring Security.
Q14. Microservices challenges?
A: Communication, monitoring, and data consistency.
==============================
DATABASE
==============================
Q15. MySQL vs PostgreSQL?
A: PostgreSQL supports advanced features; MySQL is simpler.
Q16. ACID?
A: Atomicity, Consistency, Isolation, Durability.
Q17. Query optimization?
A: Indexing, pagination, optimized joins.
==============================
REACT
==============================
Q18. Why React?
A: Component-based, fast UI rendering.
Q19. Hooks?
A: useState, useEffect manage state and lifecycle.
Q20. Performance optimization?
A: Memoization and avoiding unnecessary renders.
==============================
GIT & AGILE
==============================
Q21. Merge vs Rebase?
A: Merge keeps history; rebase creates linear history.
Q22. Agile role?
A: Sprint planning, development, stand-ups, retrospectives.
==============================
SCENARIO BASED
==============================
Q23. Slow API in production?
A: Analyze logs, DB queries, caching, and optimize.
Q24. React multiple re-renders?
A: Use memoization and proper state management.
Q25. Client communication?
A: Explain issues in simple business terms.