package com.ConstructorWithNoArguments;
public class Quantum_Bodyarmo {
int am_dy_pw;
float ar_ve;
public Quantum_Bodyarmo(){
System.out.println("无参的方法执行了");
int newAm_dy_pw;
float newAr_ve;
public Quantum_Bodyarmo(int newAm_dy_pw,float newAr_ve){
am_dy_pw=newAm_dy_pw;
ar_ve=newAr_ve;
System.out.println("有参的方法执行了");
}
}
}
4 回答
陈十四
TA贡献36条经验 获得超13个赞
package com.ConstructorWithNoArguments; public class Quantum_Bodyarmo { public Quantum_Bodyarmo(){ System.out.println("无参的方法执行了"); } int newAm_dy_pw; float newAr_ve; public Quantum_Bodyarmo(int newAm_dy_pw,float newAr_ve){ am_dy_pw=newAm_dy_pw; ar_ve=newAr_ve; System.out.println("有参的方法执行了"); } }
//你把第二个方法给囊括到第一个方法里面了,大括号的位置不对;要细心啊,细节决定成败,特别是程序猿!!!!!!!!!
添加回答
举报
0/150
提交
取消