public class UserWord extends WordADT {
public int WORD_STATUS;
public int POINT_OF_WORD;
public int COUNT_OF_WRONG_ANSWER;
@Override
public Object getClone() throws CloneNotSupportedException {
return super.clone();
}
}
AND `
Userword temp = new Userword();
Usertword temp2 = temp.getClone(); //this way doesn't work.
I can't use getClone() method. I'm getting this error. How can i clone a instance?
java.lang.CloneNotSupportedException: Class UserWord doesn't implement Cloneable.
Fixed: clone:() method needs to implement IClonable inferface