What I would like to do is to define a copy constructor which takes A as an argument and it initializes the new A to be a deep copy of argument A
public class A<E extends Comparable<? super E>> implements B<E>
{
private A a;
private E[] hArray;
// What I tried .... my copy constructor
public A(A other)
{
this.a = other; // deep copy
}
}
Is this the right way of doing deep copy through copy constructor??