成员变量的值在构造函数开始运行时赋值既顺序是
执行Test()后:
int i;
i = 6;
this();
但是你写了this(i);这时的顺序是
int i;
this(i);
i = 6;
因为this(some arg)是在构造函数中第一个出现的东西;
不写this(i)时的执行顺序是:
int i;
i = 6;
this();
System.out.println(i);
当然不会报错
执行Test()后:
int i;
i = 6;
this();
但是你写了this(i);这时的顺序是
int i;
this(i);
i = 6;
因为this(some arg)是在构造函数中第一个出现的东西;
不写this(i)时的执行顺序是:
int i;
i = 6;
this();
System.out.println(i);
当然不会报错
class Father {
...
}
class Son : public Father {
...
}
这样才是父子关系。:)
人要形成胚胎后才有手,
这里应该是精子在受孕之后,还没有形成胚胎,
就想对他的手进行操作。