About 84,300 results
Open links in new tab
  1. Constructors in C++ - GeeksforGeeks

    Jan 17, 2026 · A parameterized constructor lets us pass arguments to initialize an object's members. It is created by adding parameters to the constructor and using them to set the values of the data …

  2. Constructors - C# | Microsoft Learn

    Mar 15, 2025 · A constructor in C# is called when a class or struct is created. Use constructors to set defaults, limit instantiation, and write flexible, easy-to-read code.

  3. 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 arguments that …

  4. C++ Constructors - W3Schools

    A constructor is a special method that is automatically called when an object of a class is created. To create a constructor, use the same name as the class, followed by parentheses ():

  5. 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 object is created, …

  6. 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:

  7. 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. Note: This page introduces the constructor syntax. For the constructor …