mercredi 18 avril 2018

What happens if you evaluate a bitwise AND of two strings in Java? [duplicate]

This question already has an answer here:

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