Meaning & use

constructor

noun·Advanced

Last updated

UK/kənˈstrʌk.tər/
US/kənˈstrʌk.tɚ/

Meanings

  1. nouncountable

    A person or company that builds things, especially large structures or machines.

    Grammar: Countable noun: a constructor, the constructor, constructors.

    Patterns

    • a constructor of something
    • the constructor of a building

    The constructor of the bridge was praised for finishing ahead of schedule.

    She works as a constructor for a company that builds wind turbines.

  2. nouncountablecomputingtechnical

    In programming, a special method that creates and initializes a new object.

    Grammar: Technical term; often used with 'class' or 'object'.

    Patterns

    • a constructor for a class
    • call a constructor
    • define a constructor

    In Java, a constructor has the same name as the class.

    The constructor initializes the object's properties when it is created.

Word forms

pluralconstructors

Common combinations

call a constructor
When you create a new instance, the program automatically calls a constructor.
default constructor
If you don't define any constructor, the compiler provides a default constructor.
constructor method
The constructor method sets up the initial state of the object.
building constructor
The building constructor hired more workers to meet the deadline.

Synonyms and how they differ

builder
More common for a person who builds houses or other structures; 'constructor' is often used in technical or formal contexts.
maker
General word for someone who makes things; 'constructor' specifically suggests building large or complex things.
initializer
In programming, a broader term; 'constructor' specifically creates and initializes an object.

Opposites

Word family

construct verb
To build or create something.
construction noun
The process or business of building things.
constructive adjective
Helpful and intended to improve something.

Commonly confused: constructor or constructor?

constructor vs constructor

Not to be confused with 'constructor' vs 'constructor' – no common confusion; but learners sometimes mix with 'constructor' and 'constructor'.

Practice

In object-oriented programming, what is a constructor?

Make it your own

Write a sentence using “constructor”, then check it and compare it with the examples above.

Your sentence stays on this page and is not sent anywhere.

Explore more words