Often I find myself writing if statements like this...
if (name.equals("fred") || name.equals("bob") || name.equals("jack")){}
or with primitives...
if (numb==4 || numb==45 || numb=91){}
Is there a more concise way to do this?
Aucun commentaire:
Enregistrer un commentaire