不能。因为 this()
和 super()
必须是类构造函数中的第一条语句。
例子:
public class Test{
Test()
{
super();
this();
System.out.println("Test class object is created");
}
public static void main(String []args){
Test t = new Test();
}
}
运行错误:
Test.java:5: error: call to this must be first statement in constructor