Příklad
public class
ClassA
extends
Cloneable {
public
clone() {
}
}
Řešení
Vždy deklarujte metodu clone() throws CloneNotSupportedException pro třídu Cloneable.
public class
ClassA
extends
Cloneable {
public
clone
throws
CloneNotSupportedException () {
//...
}
}