|JavaWord count:50|Reading time: 1 min| Post View:
创建对象的方式
- 用new关键字创建
- 调用对象的clone方法
- 利用反射,调用Class类的或者是Constructor类的newInstance()方法
- 用反序列化,调用ObjectInputStream类的readObject()方法
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.