Which of the following are correct for copy constructor?
A. A copy constructor is a constructor that takes an instance of its class as an argument and creates a clone of its argument
B. A copy constructor must be used when a final field must be set in creating the clone because only a constructor can set a final field
C. All of the mentioned
D. None of the mentioned
Answer:A
Which of the following are correct for copy constructor?
A. A copy constructor is a constructor that takes an instance of its class as an argument and creates a clone of its argument B. A copy constructor must be used when a final field must be set in creating the clone because only a constructor can set a final field C. All of the mentioned D. None of the mentioned
Explanation: All of the mentioned are true.