java 构造类方法
public user(int a,int b){ this.a=a; this.b=b;}public user(int a,int b,int c){ this(a,b); this.c=c;}在第二个方法中,不能使用第一个方法名来构造,只能使用this,并且只能放在第一行。this不能用于static方法中,因为this只能用于对象中
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。