Object Copy - Implementation

Implementation

Nearly all object-oriented programming languages provide some way to copy objects. As the majority of languages do not provide most objects themselves, the programmer has to define how an object should be copied, just as he or she has to define if two objects are identical or even comparable in the first place. Many languages provide some default behavior.

How copying is solved varies from language to language and what concept of an object it has. The following presents examples for two of the most widely used object-oriented languages, C++ and Java, which should cover nearly every way that an object-oriented language can attack this problem.

Read more about this topic:  Object Copy