What is the use of a copy constructor?
Answer / Sandhya Yadav
A copy constructor in Java is used to create a new object by initializing it with the values from an existing object. This is useful when we want to make a deep copy of an object, instead of just referencing it.nCopy constructors are invoked implicitly during object creation.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can we declare an array without size in java?
What does the @override annotation do?
Is null an object in java?
Why is java multithreaded?
What is difference overloading and overriding?
why java does not contain pointers?
Can an interface extend a class?
Why are pointers not secure?
What is the purpose of the System class?
What is a class instance variable?
I want to know the host name and provider name for tcs web mail
What is mnemonic in assembly language?