About 95,400 results
Open links in new tab
  1. 构造器 - 维基百科,自由的百科全书

    在 类别基础的 面向对象程序设计 中, 构造器 (英语: Constructor,有時簡稱 ctor),别称: 构造方法 、 构造函数 、 建构子、建構式)是一个 类 里用于建立对象的特殊 子程序。它能初始化一个新建的 …

  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. java的Constructor (构造器)的理解_java constructor类-CSDN博客

    Dec 22, 2025 · 文章浏览阅读6.7w次,点赞63次,收藏199次。本文深入讲解Java构造器的使用规则,包括构造器与类的关系、构造器的特点、构造器与实例方法的区别、构造器中this和super的使用,以及 …

  4. Java Constructors - W3Schools

    Java Constructors 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 …

  5. 构造函数 - JavaScript | MDN

    constructor 是一种用于创建和初始化 class 对象实例的特殊方法。

  6. Java Constructors - GeeksforGeeks

    Jan 20, 2026 · A constructor in Java is a special member that is called when an object is created. It initializes the new object’s state. It is used to set default or user-defined values for the object's …

  7. Java - Constructors

    Java Constructors Java constructors are special types of methods that are used to initialize an object when it is created. It has the same name as its class and is syntactically similar to a method. …

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

  9. Providing Constructors for Your Classes (The Java™ Tutorials - Oracle

    A class contains constructors that are invoked to create objects from the class blueprint. Constructor declarations look like method declarations—except that they use the name of the class and have no …

  10. 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 examples.