SE450
:
Cloning
[37/86]
Object.clone
makes new object and copies all fields
Cloning is subtle
Object.clone
is
protected
Subclass
must
redefine
clone
to be
public
public class Employee
{
public
Object clone()
{
return super.clone(); // not complete
}
...
}