Java Interview Question Answer
Java Interview Question Answer
What are difference between inheritance and Interface of real time example our
project ?
https://www.edureka.co/blog/interview-questions/oops-interview-questions/
https://www.edureka.co/blog/interview-questions/java-collections-interview-
questions/
https://javaconceptoftheday.com/java-exception-handling-interview-questions-and-
answers/
https://www.edureka.co/blog/interview-questions/spring-boot-interview-questions/
https://www.edureka.co/blog/interview-questions/hibernate-interview-questions/
https://www.javatpoint.com/working-of-hashmap-in-java
https://www.geeksforgeeks.org/singleton-class-java/
-----------CORE JAVA
-----------------------------------------------------------------------------------
-----------------------------------------------------------------
0. List the features of Java Programming language?
1. What are the main features of OOPs(Object-oriented programming)?
2. Inheritance
3. Polymorphism
4. Encapsulation
5. Data abstraction
6. Is it java object oriented langauge ?
7. How many methods are there in Object class? :- getClass(),toString(), hasCode(),
equals(Object obj),notify(),notifyAll(),wait(),finalize() & clone()
---------------------Table of Contents-----------------------------
-----------------------
SPRING-----------------------------------------------------------------------------
---------------------------------------------------------
-------------SPRING
MVC--------------------------------------------------------------------------------
---------------------------------------------------------------------
------------SPRING
BOOT-------------------------------------------------------------------------------
--------------------------------------------------------------------------
1. What is Spring Boot?
2. What are the important Goals of Spring Boot?
3. What are the important Features of Spring Boot?
4. Compare Spring Boot vs Spring?
5. Compare Spring Boot vs Spring MVC?
6. What is the importance of @SpringBootApplication?
7. What is Auto Configuration?
8. How can we find more information about Auto Configuration?
9. What is an embedded server? Why is it important?
10. What is the default embedded server with Spring Boot?
11. What are the other embedded servers supported by Spring Boot?
12. What are Starter Projects?
13. Can you give examples of important starter projects?
14. What is Starter Parent?
15. What are the different things that are defined in Starter Parent?
16. How does Spring Boot enforce common dependency management for all its Starter
projects?
17. What is Spring Initializr?
18. What is application.properties?
19. What are some of the important things that can customized in
application.properties?
20. How do you externalize configuration using Spring Boot?
21. How can you add custom application properties using Spring Boot?
22. What is @ConfigurationProperties?
23. What is a profile?
24. How do you define beans for a specific profile?
25. How do you create application configuration for a specific profile?
26. How do you have different configuration for different environments?
27. What is Spring Boot Actuator?
28. How do you monitor web services using Spring Boot Actuator?
29. How do you find more information about your application envrionment using
Spring Boot?
30. What is a CommandLineRunner?
------------------------SPRING
DATA-------------------------------------------------------------------------------
--------------------------------------------------
--------------------------Unit
Testing----------------------------------------------------------------------------
------------------------------------------------
----------------------------------
AOP--------------------------------------------------------------------------------
----------------------------------------------
---------------------SOAP WEB
SERVICES---------------------------------------------------------------------------
---------------------------------------------------------
----------------------------------RESTFUL WEB
SERVCIES---------------------------------------------------------------------------
--------------------------------------
1. What is REST?
2. What are the key concepts in designing RESTful API?
3. What are the Best Practices of RESTful Services?
4. Can you show the code for an example Get Resource method with Spring REST?
5. What happens when we return a bean from a Request Mapping Method?
6. What is GetMapping and what are the related methods available in Spring MVC?
7. Can you show the code for an example Post Resource method with Spring REST?
8. What is the appropriate HTTP Response Status for successful execution of a
Resource Creation?
9. Why do we use ResponseEntity in a RESTful Service?
10. What is HATEOAS?
11. Can you give an Example Response for HATEOAS?
12. How do we implement it using Spring?
13. How do you document RESTful web services?
14. Can you give a brief idea about Swagger Documentation?
15. How do you automate generation of Swagger Documentation from RESTful Web
Services?
16. How do you add custom information to Swagger Documentation generated from
RESTful Web Services?
17. What is Swagger-UI?
18. What is “Representation” of a Resource?
19. What is Content Negotiation?
20. Which HTTP Header is used for Content Negotiation?
21. How do we implement it using Spring Boot?
22. How do you add XML support to your RESTful Services built with Spring Boot?
23. How do you implement Exception Handling for RESTFul Web Services?
24. What are the best practices related to Exception Handling with respect to
RESTful Web Services?
25. What are the different error status that you would return in RESTful Web
Services?
26. How would you implement them using Spring Boot?
27. What HTTP Response Status do you return for validation errors?
28. How do you handle Validation Errors with RESTful Web Services?
29. Why do we need Versioning for RESTful Web Services?
30. What are the versioning options that are available?
31. How do you implement Versioning for RESTful Web Services?