Google News
logo
Java Constructor - Interview Questions
Do we have Copy Constructor in Java?
Like C++, Java also supports copy constructor. But, unlike C++, Java doesn’t create a default copy constructor if you don’t write your own.
To copy the values of one object into another in java, you can use :

* Constructor
* Assigning the values of one object into another
* clone() method of Object class
Advertisement