About 33,500,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. How to Use Constructors in Java: A Beginner's Guide

    Jul 8, 2025 · Constructors are special types of methods with no return type. They are basically used to initialise the object, to set up its internal state, or to assign default values to its …

  4. Understanding Constructors in Programming: Features, Use …

    Jun 18, 2025 · What is a Constructor? A constructor is a special type of method in object-oriented programming (OOP) that is used to initialize an object when it is created.

  5. 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 …

  6. What Are Constructors in Programming Languages and How Do …

    Constructors are special methods in object-oriented programming (OOP) used to initialize new objects. When a class is instantiated, the constructor is called to set initial values for the …

  7. Constructor - Glossary | MDN

    Jul 11, 2025 · A constructor is a specialized function that generates objects with the same shape and behavior. The constructor initializes this object with some data specific to the object. The …

  8. Java Constructors (With Examples) - Programiz

    Constructors in Java are similar to methods that are invoked when an object of the class is created. In this tutorial, we will learn about Java constructors and their types with the help of …

  9. Object Oriented Programming/Constructors - Wikibooks

    Dec 31, 2020 · In Object Oriented Programming, a constructor is a function that is executed when a new class object is created. This subroutine ensures that the class is properly instantiated.

  10. Constructors in C++ - GeeksforGeeks

    Sep 23, 2025 · Constructors are mostly declared as public member of the class though they can be declared as private. Constructors do not return values, hence they do not have a return type.