日期:2014-05-20  浏览次数:20593 次

this(10);是什么意思?
public   ArrayList()
{
        this(10);
}

------解决方案--------------------
调用本类其他构造函数,必须放在所在构造函数的第一行
------解决方案--------------------
调用本类参数为int的构造方法.
class A{
public A(int a){
System.out.println(a);
}
public A(){
this(10);//调用上面一个构造方法,参数为10,输出10;
}
}