Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is difference between shallow copy and deep copy? Which is default?



What is difference between shallow copy and deep copy? Which is default?..

Answer / hrpynux@gmail.com

Default version of clone method creates the shallow copy of an object. To create the deep copy of an object, you have to override clone method. Shallow copy is preferred if an object has only primitive fields. Deep copy is preferred if an object has references to other objects as fields.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is compilation?

1 Answers   Datamatics, TCS,


Write a C++ program to sort digits of all the 4 digit number and display the sorted 4 digit number

1 Answers   TATA, TCS,


Can c++ be faster than c?

0 Answers  


Differentiate between declaration and definition in C++?

1 Answers  


Is c++ low level?

0 Answers  


What is a template in c++?

3 Answers  


Does c++ have arraylist?

0 Answers  


How do you know that your class needs a virtual destructor?

5 Answers   Lucent,


what is meaning of isa and hsa

1 Answers  


What is c++ code?

0 Answers  


Can non-public members of another instance of the class be retrieved by the method of the same class?

0 Answers  


What is called array?

0 Answers  


Categories