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