Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|- Interview Questions and Answers for 'Cloning object' - 1 question(s) found - Order By Newest|
|Ans. Copy Constructor is used for creating a duplicate of another object. Duplicate object will have the same state of the copied object but will have independent values in different memory locations. Copy Constructor can be useful to create duplicates of immutable objects as the Original cannot be tampered. Moreover It can be useful if base copies are required for individual requests in threading.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  copy constructor  clone  cloning object   immutable  immutability  immutability|
|Does Java provides default copy constructor ?|