This question already has an answer here:
So i have an if-statement, which should compare a String to one of these strings: "J", "O", "J_1", "Z" I need the if statement to check, wether the string matches one of these. I could do this using else if, but that would be against the DRY (dont repeat yourself) concept. So do you have an idea if this can be done an other way, than with else if?
Aucun commentaire:
Enregistrer un commentaire