After conducting some research, it appears that the question I have in mind has not been asked before, or maybe it has slipped under my radar.
A rational approach would be to consider the following logic:
false && false === true
false && true === false
true && false === false
true && true === true
HOWEVER
Interestingly, upon testing this logic in javascript
using both FireFox and Chrome consoles, I observed different results:
false && false //console output: false
false && true //console output: false
true && false //console output: false
true && true //console output: true
Although a workaround has been found, it still begs the question - why is this happening? One would expect this to follow standard behavior.
It is worth noting that even in the Java
documentation, there is mention of logical AND | &&
.