我有一个作业要做,我的老师为我提供了一部分代码,可以帮助我完成上述作业。但我不确定其中的一部分;
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;
}