What is a copy constructor in Java?