Construction method

来源:互联网 发布:鸟哥的php博客 编辑:程序博客网 时间:2024/05/17 22:05

1、Use the new and construction method to create a new object

      使用new+构造方法,创建一个新的对象。

2、The construction method is the method used to initialize the object

      构造方法是用来初始化对象的方法。

3、The construction method must be the same name as the class and have no return value.

      构造方法必须与类同名且没有返回值。

4、The construction method can also not contain void

      构造方法同样也不能包含void

原创粉丝点击