Java创建对象有几种方式?

java中提供了以下四种创建对象的方式:
1.new创建新对象
2.通过反射机制
3.采用clone机制
4.通过序列化机制

猜你喜欢

转载自blog.csdn.net/m0_51684972/article/details/109172487