differentiate between logical and & logical or operator in Java
Answers
Answered by
1
Answer:
For absolute beginners, & is used to represent AND logic operation in Java and | is used to represent OR logic operation. If we use only one & or | then it's known as “bitwise AND” and bitwise OR operators and if we use double && or || then it's known as logical or short-circuit AND and OR operators
Answered by
0
From the name, you can guess bitwise operates at the bit level and perform AND logical operation to each bit, while logical operators operate on boolean variables only.
Similar questions