Constructor (object-oriented programming): Difference between revisions

Content deleted Content added
Constructor
Tags: Visual edit Mobile edit Mobile web edit
m Reverted 1 edit by 223.185.63.208 identified as test/vandalism using STiki
Line 1:
{{refimprove|date=August 2010}}
ConstructedConstr{{ProgLangCompare}}
In [[class-based programming|class-based]] [[object-oriented programming]], a '''constructor''' (abbreviation: '''ctor''') in a [[Class (computer programming)|class]] is a special type of [[subroutine]] called to [[object creation|create an object]]. It prepares the new object for use, often accepting [[argument]]s that the constructor uses to set required [[member variable]]s.