Bitwise and Logic operator
In java, bitwise operator process numerical data and works on bit of those data. At a time one bit of that
data is processed. Logical operator works on boolean value.
Each one of operator type has binary as well as unary operator. Generally result of bitwise operator
would be some numeric value and logical operator produces Boolean result.
Difference between logical and bitwise operator
Both operator can be used on Boolean values. When bitwise operator used on Boolean values, it follows
rules of bitwise operator on Boolean values and result is produced.
Bitwise XOR (^) operator result
Another thing, bitwise operator evaluates both side operand before executing (example I, &). Other
hand logical operators are short circuit. If first operand result is enough to decide final result of logical
condition, it’ll never evaluate second operator.