protected native Object clone() throws CloneNotSupportedException;
创建并返回此对象的一个副本。“
x.clone() != x为 true
x.clone().getClass() == x.getClass()也为 true
x.clone().equals(x)为 true
4-7_java.lang,Object_clone方法的作用
最新推荐文章于 2024-05-16 19:59:55 发布