I have an assignment to do, and my teacher provided me with a part of code which could help doin said assignment. But I am unsure of one part of it;
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;
}