62,635
社区成员




public Employee clone() throws CloneNotSupportedException{
Employee cloned=(Employee)super.clone();
cloned.hireday=(Date) hireday.clone();
return cloned;
}
为什么会有The return type is incompatible with Object.clone()的错误呢
public Object clone() throws CloneNotSupportedException{
Employee cloned=(Employee)super.clone();
cloned.hireday=(Date) hireday.clone();
return cloned;
}
@Override
protected Object clone() throws CloneNotSupportedException {
// TODO Auto-generated method stub
return super.clone();
}