作业帮 > 综合 > 作业

public String getPossibleSecretPeople()

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/07/02 12:24:15
public String getPossibleSecretPeople()
{
String possibles = "";
int count = 1;
String padding = " ";
String temp = "";
int padNeeded = 0;
for(int i = 0; i < whoIsNotSecretPerson.length; i++)
{
if(!whoIsNotSecretPerson[i])
{
temp = gameFuncs.getPersonAtIndex(i);
padNeeded = 20 - temp.length();
temp += padding.substring(0,padNeeded) + "[" + gameFuncs.getPersonDetailsAtIndex(i) + "]";
possibles += temp + "\n";
count++;
}
}
return possibles;
}
public String getPossibleSecretPeople()
给你个例子 a+=b 意思是 a=a+b,这是 c语言的常用写法 ;
是C语言的波兰式 ,可以上网搜一下.