Why do we need copy constructor and when should we use copy constructor in java
There are 2 good reasons for using a copy constructor instead of the constructor passing all parameters : when you have a complex object with many attributes it is much simpler to use the copy constructor if you add an attribute to your class, you just change the copy constructor to take this new attribute … Read more