I think this question is very straightforward, but I tried to google it, google wldn't take in the symbol '&'.
Can anyone explain what is the difference btwn the 2? I know && is used in conditionals. But &?
Thank you.
Printable View
I think this question is very straightforward, but I tried to google it, google wldn't take in the symbol '&'.
Can anyone explain what is the difference btwn the 2? I know && is used in conditionals. But &?
Thank you.
the single ampersand is a bit-wise operator. Google "Java bit-wise operators" if you want more info.
Bitwise operators -> Bitwise and Bit Shift Operators (The Java™ Tutorials > Learning the Java Language > Language Basics)
Conditional operators -> Equality, Relational, and Conditional Operators (The Java™ Tutorials > Learning the Java Language > Language Basics)
Luck,
CJSL