Originally posted by Akash Roy:
hi,
but doesnt () have a higher precedence than || and &&.
Regards
it does, but in this case it's irrelevant!
After the JVM determines that the statement "a = true" returns true is knows that the entire conditional statement is true (because of the shortcut || operator) and is content to skip the rest of the statement (as it's pointless because it won't affect the result).