ioc Flashcards

1
Q

What is IOC?

A

Spring creates objects, wires them together, configure them, and manage their life cycle
The objects are spring beans

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does IOC work?

A

Spring manages the flow of the application
Spring decides when to create objects, how to wire up dependencies, and when to destroy them

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a dependency

A

Objects needed for a class to function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why use dependency injection?

A

Promotes loose coupling, testability, and flexibility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Adfantages of IOC and DI

A

Reduced coupling
Improfed testability
Modular and resuable
Flexible and maintainable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Types of DI

A

Constructor injection (recommended)
Field injection
Setter injection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly