Constructor (object-oriented programming): Difference between revisions

Content deleted Content added
Tag: section blanking
No edit summary
Line 1:
 
{{refimprove|date=August 2010}}
{{ProgLangCompare}}
In [[class-based programming|class-based]] [[object-oriented programming]], a '''constructor''' (abbreviation: '''ctor''') is a special type of [[subroutine]] called to [[object creation|create an object]]. It prepares the new object for use, often accepting [[Parameter_(computer_programming)|arguments]] that the constructor uses to set required [[member variable]]s.