SE450: Deep Cloning [41/86] Previous pageContentsNext page

public class Employee 
implements Cloneable
{
public Object clone()
{
try
{
Employee cloned = (Employee)super.clone();
cloned.hireDate = (Date)hiredate.clone();
return cloned;
}
catch(CloneNotSupportedException e)
{
return null; // won't happen
}
}
...
}

Previous pageContentsNext page