This question already has an answer here:
- Differences in boolean operators: & vs && and | vs || 11 answers
- Difference between & and && 13 answers
Suppose I have the following expression:
if ((word.charAt(i) == 'q') & (i == word.length() - 1))
What two things are compared by the &? Would it be the binary representations of True and False? Does it essentially work the same as a && in this situation?
Aucun commentaire:
Enregistrer un commentaire