Why do we use factory?



Why do we use factory?..

Answer / Dipti Tiwari

A factory is used to create objects, allowing for separation of object creation logic from the rest of the application. This promotes code reuse, testability, and maintainability by decoupling the object creation process.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

What is spring batch example?

1 Answers  


Why spring mvc is used?

1 Answers  


What are the different types of annotations?

1 Answers  


What does the spring bean lifecycle look like?

1 Answers  


What is the design pattern used in spring ioc?

1 Answers  


What are the different modes of autowiring?

1 Answers  


What are different scopes of spring bean?

1 Answers  


What is a transactional process?

1 Answers  


What is a controller class in spring?

1 Answers  


What is a bean in spring boot? : Spring Boot

1 Answers  


What is @enableautoconfiguration in spring boot? : Spring Boot

1 Answers  


What do you mean by spring batch?

1 Answers  


Categories