Java Software Developer Interview Questions

4,198 java software developer interview questions shared by candidates

1)Features of java 8 2)write program using lambda expression 3)stream api program to sort employess using their city 4)How do you manage memory leakage in your java application 5)features of spring 6)Rest controller vs controller 7)concurrent hashmap 8)which collection do you use in your current project 9)steps to create spring application 10)how to change embedded server in spring boot 11)sql left join 12)hibernate vs jpa 13)can we use lambda expression without functional interface
avatar

Software Engineer - Java Developer

Interviewed at Tata Consultancy Services

3.5
Apr 27, 2023

1)Features of java 8 2)write program using lambda expression 3)stream api program to sort employess using their city 4)How do you manage memory leakage in your java application 5)features of spring 6)Rest controller vs controller 7)concurrent hashmap 8)which collection do you use in your current project 9)steps to create spring application 10)how to change embedded server in spring boot 11)sql left join 12)hibernate vs jpa 13)can we use lambda expression without functional interface

They mostly asked me about basic Java and OOP-related concepts. The focus was on core Java fundamentals, object-oriented programming principles, exception handling, multithreading, and collections. They wanted to see how well I understood the concepts and whether I had a clear, in-depth knowledge of Java
avatar

Software Engineer - Java Developer

Interviewed at Live Connections

3.3
Mar 12, 2025

They mostly asked me about basic Java and OOP-related concepts. The focus was on core Java fundamentals, object-oriented programming principles, exception handling, multithreading, and collections. They wanted to see how well I understood the concepts and whether I had a clear, in-depth knowledge of Java

1.Can you explain the internal working of HashMap in Java? 2. How can you convert a HashMap into an ArrayList? 3. How can you use a custom class as a key in a HashMap? 4. If a class has four variables (two private and two public) with generated getters and setters, does it still achieve encapsulation? Why or why not? 5. Can you describe a deadlock situation in Java? How can it be avoided? 6. How is exception handling managed in Spring Boot applications? 7. In Spring Boot, if you don't want to use the embedded server (like Tomcat) and prefer JBoss, how can you configure it? 8. What is the difference between the @Bean and @Component annotations in Spring? 9. What is the purpose of the "spring-boot-starter-parent" dependency in Spring Boot? 10. How do you create REST APIs in Spring Boot? How do you secure these REST endpoints? 11. What are @RestController and @Controller annotations in Spring? In which scenarios would you use each of them? 12. What are the best practices or rules for designing REST APIs? 13. Are you working with microservices? If yes, how do these microservices communicate with each other? 14. How have you implemented "RestTemplate" for communication between microservices in your project? 15. Can you explain the common design patterns used in microservices architecture? 16. What is the circuit breaker design pattern? How did you implement it in your project? 17. Do you have experience in writing test cases? Which testing frameworks do you use? 18. What is the purpose of the @Mock and @InjectMocks annotations in unit testing?
avatar

Java Software Developer

Interviewed at Nityo Infotech

3.4
Nov 9, 2025

1.Can you explain the internal working of HashMap in Java? 2. How can you convert a HashMap into an ArrayList? 3. How can you use a custom class as a key in a HashMap? 4. If a class has four variables (two private and two public) with generated getters and setters, does it still achieve encapsulation? Why or why not? 5. Can you describe a deadlock situation in Java? How can it be avoided? 6. How is exception handling managed in Spring Boot applications? 7. In Spring Boot, if you don't want to use the embedded server (like Tomcat) and prefer JBoss, how can you configure it? 8. What is the difference between the @Bean and @Component annotations in Spring? 9. What is the purpose of the "spring-boot-starter-parent" dependency in Spring Boot? 10. How do you create REST APIs in Spring Boot? How do you secure these REST endpoints? 11. What are @RestController and @Controller annotations in Spring? In which scenarios would you use each of them? 12. What are the best practices or rules for designing REST APIs? 13. Are you working with microservices? If yes, how do these microservices communicate with each other? 14. How have you implemented "RestTemplate" for communication between microservices in your project? 15. Can you explain the common design patterns used in microservices architecture? 16. What is the circuit breaker design pattern? How did you implement it in your project? 17. Do you have experience in writing test cases? Which testing frameworks do you use? 18. What is the purpose of the @Mock and @InjectMocks annotations in unit testing?

Viewing 1691 - 1700 interview questions

Glassdoor has 4,198 interview questions and reports from Java software developer interviews. Prepare for your interview. Get hired. Love your job.