I'm wanting to code a copy constructor for a generically defined class. I have an inner class Node, which I am going to use as the nodes for a binary tree. When I pass in a a new Object
public class treeDB <T extends Object> {
//methods and such
public T patient;
patient = new T(patient2); //this line throwing an error
//where patient2 is of type <T>
}
I just don't know how to generically define a copy constructor.