The
Cloneable
Interface
Object.clone
is nervous about cloning
Will only clone objects that implement
Cloneable
interface
public interface Cloneable { }
Interface has no methods!
Tagging interface--used in test
if x implements Cloneable
Object.clone
throws
CloneNotSupportedException
A checked exception
previous
|
start
|
next
.... [Slide 31] ....