0% found this document useful (0 votes)
15 views14 pages

Java Interview Questions & Guide

Uploaded by

rk2493853
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views14 pages

Java Interview Questions & Guide

Uploaded by

rk2493853
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

# JAVA FULL INTERVIEW GUIDE (DETAILED VERSION)

## 1. CORE JAVA INTERVIEW QUESTIONS

### OOPS Concepts

1. What are the four pillars of OOP?

2. Difference between Abstraction and Encapsulation.

3. What is Polymorphism? Types?

4. What is method overloading vs overriding?

5. What is the difference between IS-A and HAS-A relationship?

### Classes & Objects

6. What is constructor overloading?

7. What is constructor chaining?

8. Difference between shallow copy and deep copy.

9. What is immutable class in Java?

### Important Keywords

10. final vs finally vs finalize.

11. static keyword uses.

12. transient keyword use.

---
## 2. COLLECTIONS FRAMEWORK

13. What is Collection vs Collections?

14. Difference between ArrayList and LinkedList.

15. HashMap internal working (VERY IMPORTANT).

16. What is rehashing?

17. Difference between HashMap, LinkedHashMap, TreeMap.

18. Difference between HashSet and TreeSet.

19. Fail Fast vs Fail Safe.

20. Iterator vs ListIterator.

21. Comparable vs Comparator.

---
## 3. EXCEPTION HANDLING

22. What is exception hierarchy?

23. Checked vs Unchecked.

24. throw vs throws.

25. Custom exception creation.

26. try-with-resources.

---
## 4. MULTITHREADING & CONCURRENCY

27. Thread class vs Runnable.

28. Thread lifecycle.

29. Synchronization – object lock vs class lock.

30. Deadlock, livelock, starvation.

31. volatile keyword.

32. Executor framework.

33. Callable vs Runnable.

34. Future & CompletableFuture.

---
## 5. JAVA 8 & MODERN JAVA

35. Lambda expressions.

36. Streams API – map, filter, reduce, sorted, collect.

37. Optional class usage.

38. Method references.

39. Functional interfaces.

40. LocalDateTime API.

---
## 6. JVM INTERNALS

41. JVM Architecture.

42. JDK vs JRE vs JVM.

43. ClassLoader types.

44. Garbage collection algorithm.

45. Heap vs Stack memory.

46. Memory leaks in Java.

---
## 7. SPRING & SPRING BOOT

### Spring Core

47. What is IoC? Example.

48. What is Dependency Injection?

49. Bean lifecycle.

50. @Component, @Service, @Repository difference.

### Spring Boot

51. What is auto-configuration?

52. Starter dependencies.

53. @RestController vs @Controller.

54. @GetMapping, @PostMapping.

55. Validation using @Valid.

---
## 8. SPRING DATA JPA / HIBERNATE

56. What is JPA?

57. Entity lifecycle.

58. OneToOne, OneToMany, ManyToMany.

59. Lazy vs Eager loading.

60. JPQL vs Native Query.

61. Transactions – @Transactional.

62. Cascade types.

63. What is N+1 problem?

---
## 9. SQL INTERVIEW QUESTIONS

64. Types of JOINs.

65. Clustered vs Non-clustered index.

66. ACID properties.

67. Normalization.

68. Stored procedures vs functions.

69. SQL optimization methods.

---
## 10. MICROSERVICES

70. What is a microservice?

71. Monolithic vs Microservice.

72. API Gateway.

73. Service Discovery – Eureka.

74. Config Server.

75. Feign client.

76. Circuit breaker (Resilience4J).

77. Distributed tracing – Zipkin.

---
## 11. SYSTEM DESIGN (BEGINNER + INTERVIEW LEVEL)

78. What is load balancing?

79. CAP theorem.

80. Caching (Redis).

81. SQL vs NoSQL.

82. Message queues – Kafka, RabbitMQ.

83. Horizontal vs Vertical scaling.

84. Rate limiting.

---
## 12. JAVA CODING INTERVIEW QUESTIONS (MUST PRACTICE)

85. Reverse a linked list.

86. Detect cycle in linked list.

87. Two Sum.

88. Longest substring without repeating characters.

89. Implement LRU cache.

90. Find missing number.

91. Merge intervals.

92. Binary search variations.

---
## 13. SPRING BOOT CODING QUESTIONS

93. Build a REST API for CRUD.

94. Add validation.

95. Global exception handling.

96. Pagination & Sorting.

97. JPA relationships mapping.

---
## 14. HR INTERVIEW QUESTIONS FOR JAVA DEVELOPERS

98. Tell me about yourself (Java Developer version).

99. Strengths and weaknesses.

100. Why should we hire you?

101. Explain your project architecture.

---

You might also like