clone方法示例
在TestClone
类中,创建了三个Teacher
对象:t1
、t2
和t3
。其中t2
引用t1
,t3
是t1
的克隆对象。克隆方法clone()
用于创建新对象,它独立于原始对象。
329.5KB
文件大小:
评论区