Constructor

A constructor is a function that initializes a newly allocated object.

Related concepts:  ClassObjectMethod

Closest Wikipedia entry:  Constructor (object-oriented programming)

Authoritative Definition

Wikipedia does not necessarily offer the best fitting definition of a concept. The exact meaning we attribute to the concept of Constructor is based on principled authoritative sources such as:

Misconceptions about Constructor
18 documented Misconceptions

Check Yourself

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.