best answer > What is a constructor and what does it do 2024?- QuesHub | Better Than Quora
  • What is a constructor and what does it do?

    函数 对象 时调

    Questioner:Henry Morgan 2023-05-05 12:30:35
The most authoritative answer in 2024
  • Isabella Lee——Studied at the University of Seoul, Lives in Seoul, South Korea.

    Constructor is only called when you create a object. It is not called when you later only use your object somewhere. When you create a new object, a constructor is a method that is called and it initialize the variables/fields of an object. A constructor must have the same name as the class its in.read more >>
    +119962023-05-05 12:30:35

About “函数、对象、时调”,people ask:

READ MORE:

QuesHub is a place where questions meet answers, it is more authentic than Quora, but you still need to discern the answers provided by the respondents.

分享到

取消