for (int i = 0; i < a.length; i++) {
System.out.println("输入你要增加学员的学号:");
int xh = input.nextInt();
boolean f = false;
if (xh > 000 && xh < 100) {
for (int j = 0; j < a.length; j++) {
if (xh!=a[i].getId()) {
f = true;
System.out.println("hah ");
break;
}
}
if (f = true) {
a[i].setId(xh);
System.out.println("恭喜你,学员学号录入成功");
break;
} else {
a[i].setId(xh);
System.out.println("抱歉,学号已存在");
break;
}
} else {
System.out.println("学号是这样滴?");
}
}
习惯受伤
相关分类