SyntaxFix
Write A Post
Hire A Developer
Questions
The problem is that you are using the bitwise or operator: |. If you use the logical or operator, ||, your code will work fine.
|
||
See also: http://en.wikipedia.org/wiki/Short-circuit_evaluation Difference between & and && in Java?