我需要创建新的变量Strings
,这样
String person1 = "female";
String person2 = "female";
........
........
String person60 = "male";
........
String person100 = "male";
这是我尝试过的
for (int i = 1; i <101; i++) {
if (i<60) {
String person+i = "female";
}
else {
String person+i = "male";
}
}
有人可以帮我更正这段代码吗?