1
我有一个任务要做,而且我的老师向我提供了一部分代码,可以帮助完成所说的任务。但我不确定其中的一部分;需要一些关于代码的一部分的提示
String utenRepetisjon(String tekst){
String resultat = "";
for (int i = 0; i < tekst.length(); i++){
if (!tekst.charAt(i), resultat){ //Here I need help, if someone could be an angel and explain to me what this line does: !tekst.charAt(i), resultat). I know that it it something like: if the char at spot i in the string is not present, then something, but what's up with the comma?
resultat += tekst.charAt(i);
}
}
return resultat;
}
这不会编译。 – qqilihq
这可能不会编译 –
这将无法编译。必须是错字。 –