this(10)是什么意思?publicArrayList(){this(10)}[解决办法]调用本类其他构造函数,必须放在所在构造函数
this(10);是什么意思?
public ArrayList()
{
this(10);
}
[解决办法]
调用本类其他构造函数,必须放在所在构造函数的第一行
[解决办法]
调用本类参数为int的构造方法.
class A{
public A(int a){
System.out.println(a);
}
public A(){
this(10);//调用上面一个构造方法,参数为10,输出10;
}
}
