newinstance和new的区别

newinstance将对象创建分为两个步骤,解耦的手段,先调用class.forName加载类,然后再去实例化它

new可以不用加载,不是一定

newinstance作为依赖注入

https://blog.csdn.net/qq_36523667/article/details/78883238

猜你喜欢

转载自www.cnblogs.com/wangc04/p/9263024.html