About 1,020,000 results
Open links in new tab
  1. What is Constructor? - GeeksforGeeks

    Jul 23, 2025 · A constructor is a special type of method used in object-oriented programming languages to initialize objects. The constructor is called automatically every time when an …

  2. Constructor (object-oriented programming) - Wikipedia

    In class-based, object-oriented programming, a constructor (abbreviation: ctor) is a special type of function called to create an object. It prepares the new object for use, often accepting …

  3. Constructors - C# | Microsoft Learn

    Mar 15, 2025 · A constructor is a method called by the runtime when an instance of a class or a struct is created. A class or struct can have multiple constructors that take different arguments.

  4. Java Constructors - W3Schools

    A constructor in Java is a special method that is used to initialize objects. The constructor is called when an object of a class is created. It can be used to set initial values for object attributes:

  5. constructor - JavaScript - MDN

    Jul 20, 2025 · The constructor method is a special method of a class for creating and initializing an object instance of that class.

  6. 14.9 — Introduction to constructors – Learn C++ - LearnCpp.com

    Dec 29, 2024 · We must need a matching constructor. But what the heck is that? A constructor is a special member function that is automatically called after a non-aggregate class type object …

  7. Constructors in Java - Tpoint Tech

    Apr 28, 2025 · A Constructor in Java is a block of codes like the method. It is called when an instance of the class is created.

  8. What Is a Constructor? - Computer Hope

    Jun 1, 2025 · In object-oriented programming, a constructor is a method or function for creating an instance of the class that it belongs. It has no return value and is usually identified by …

  9. Constructors in C++ - GeeksforGeeks

    Sep 23, 2025 · A constructor gets called automatically when we create the object of the class. Multiple constructors can be declared in a single class (it is even recommended - Rule Of …

  10. What Is a Constructor in C++? - Udacity

    Mar 18, 2021 · The purpose of a constructor is to construct an object and assign values to the object’s members. A constructor takes the same name as the class to which it belongs, and …