Posted By:
Ivn_Tcakov
Posted On:
Wednesday, December 12, 2001 01:22 PM
Hello I am trying to create a copy of a List class and this is how I did it: package musr.client.gui.util; import java.awt.*; public class ListC extends List implements Cloneable { // Constructor public ListC(int p0, boolean p1) {super(p0,p1);} public Object clone() throws CloneNotSupportedException { ListC returnValue = (ListC)super.clone(); return returnValue; } } However, when I call, someList = (ListC)someList.clone(); nothing happens, the newly created list is null. Can anyone help me out with a suggestion or a comment? Thanks Ivan
More>>
Hello I am trying to create a copy of a List class and this is
how I did it:
package musr.client.gui.util;
import java.awt.*;
public class ListC extends List implements Cloneable {
// Constructor
public ListC(int p0, boolean p1) {super(p0,p1);}
public Object clone() throws CloneNotSupportedException {
ListC returnValue = (ListC)super.clone();
return returnValue;
}
}
However, when I call,
someList = (ListC)someList.clone();
nothing happens, the newly created list is null.
Can anyone help me out with a suggestion or a comment?
Thanks
Ivan
<<Less