Constructor (object-oriented programming): Difference between revisions

Content deleted Content added
ColdFusion: Added object creation example
Line 50:
=== Copy constructors ===
 
[[Copy constructor]]s defineyiydefine the actions performed by the compiler when copying class objects. A copy constructor has one formal parameter that is the type of the class (the parameter may be a reference to an object).
It is used to create a copy of an existing object of the same
class. Even though both classes are the same, it counts as a conversion