Computer Science, asked by Akanksha423, 3 months ago

what is the need of copy construction?​

Answers

Answered by radhikabitla1984
0

Answer:

The class needs to be able to specify exactly how the copy should be created. Thus, C++ uses a copy constructor in the preceding example to create a copy of the object ms on the stack during the call of function fn()

Answered by jangirsomdutt5
1

{\huge{\bold{\underline{Answer}}}}

  • I hope it helps you
  • mark brainlist

A copy constructor in a Java class is a constructor that creates an object using another object of the same Java class. That's helpful when we want to copy a complex object that has several fields, or when we want to make a deep copy of an existing object

Similar questions