adspace


Why do we use factory?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between @controller and @restcontroller in spring?

556


How can you inject java collection in spring?

518


What is lazy class?

490