I have asked this question before, but i think i could not totally understand the diffefence between bitwise and logical operands. According to the book i am using to learn java, the bitwise operands can change the value and this is described as side effect. Also, in bitwise operands, both of the sides are evaluated. that means they don't perform short-circuit evaluation. For example,
(gender == 1) & (age >= 65) //evaluates age 65 >= regardless of whether gender is equal to 1.
up to here, i understand what it is. However, aafter this point the book gives another example for bitwise or (|).
(birthday == true) | (++age>= 65) // here, age always increases by 1 regardless whether the first condition is true or not.
however, i did not understand what it means by >= 65. Does it say that, if the age is bigger than 65, then the expression will be true or something like that ?
Note: Maybe i could not explain it properly, but all i want to learn is where and how to use both of them. Can you please explain ?