Constructor (object-oriented programming)

This is an old revision of this page, as edited by 68.125.168.193 (talk) at 18:01, 11 October 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In object-oriented programming, a constructor is a method which is automatically invoked when the object is created. Its main purpose is to pre-define the object's data members. A properly written constructor will leave the object in a 'valid' state.

See also

References