static LifeInsurance[] LIArray = new LifeInsurance[20];
public LifeInsurance (float dMonth, int startD,int startM,int startY,int label){
LifeInsurance.LIArray[LifeInsurance.counterLI] = this;
this.dMonth = dMonth;
this.startD = startD;
this.startM = startM;
this.startY = startY;
this.label = Individual.l;
this.codeLΙ = counterLI;
counterLI++;
}
我有了这个阵列中的寿险类,我想有一个从其他类访问this.label = Individual.l;
。访问阵列
这怎么可能?提前致谢!
任何只要使用这个类的构造函数其他类并使用xxx.getLabel(); – Makky