What are the benefits of IOC?

Alibaba cloud Q & A 2022-02-13 05:22:58 阅读数:754

benefits ioc

IOC What are the benefits ?




Take the answer 1:

If the construction of objects depends on a lot of objects , And the level is very deep , The outer layer is cumbersome in constructing objects and does not necessarily know how to build so many levels of objects . IOC Help us manage the creation of objects , Just specify how to build... In the configuration file , The configuration file of each object is specified when the class is written , So the outermost object doesn't need to care about how the deep object is created ,


copyright:author[Alibaba cloud Q & A],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130522559975.html