"Using a copy constructor for creating a new object as a copy of an existing object"
public class SampleClass
{
int x;
int y;
public SampleClass(SampleClass old) // Copy Constructor
{
this.x = old.x;
this.y = old.y;
}
public SampleClass(int x, int y) // Regular constructor
{
this.x = x;
this.y = y;
}
}
The copy constructor creates a copy of an object which is passed into the constructor.
"Creating your own interface with copy methods"
Honestly not sure exactly what they're alluding to here. Perhaps they mean creating an interface with a copy() method in it which you can then implement, but I'm not sure why you wouldn't just use the Cloneable interface.