Member-only story

Spring Interview Questions

Gain Java Knowledge
9 min readSep 15, 2020

--

Best Spring interview Questions And Answers

1.Q : WHAT IS SPRING FRAMEWORK ?

ANS : Spring is an open source, light weight, loosely coupled, aspect oriented, dependency Injection
based java application framework to develop various applications.

2.Q : WHAT IS THE DIFFERENCE BETWEEN DEPENDENCY INJECTION AND DEPENDENCY LOOKUP ?

ANS :

DEPENDENCY LOOKUP :

If the resources class or object is searching and getting its dependent values from other resources
then it is called dependency lookup. Here the resources pulls the dependent values.
The way we get JDBC connection object from JDBC connection pool is called Dependency Lookup.

Dependency Injection :

If the under lying server/container/framework assign the values to resources/class/object dynamically at runtime then it is called Dependency Injection.
Here dependent values will be pushed to resource.

JVM calling constructor automatically to assign initial values to the object when the object is created.

3. Q: WHAT IS SPRING BEAN ?

The Java class whose object is managed by spring container is called Spring Bean.

4. Q : WHAT IS IOC ?

--

--

Gain Java Knowledge
Gain Java Knowledge

Written by Gain Java Knowledge

The Java programming language is one of the most popular languages today. Stay up to date with news, certifications, free learning resources and much more.

No responses yet