+ 1
What is the answer of this expression Is this can be together && and || ?
int x =19, z= -6, y = 19: (x == z) || (z <x } && (y < 8 * 4):
5 Answers
+ 3
Your code doesn't have anything to do with regular expressions. I think "Java" would fit better.
Again:
đ Check the spelling and the brackets/ parentheses
+ 2
Please tag the relevant programming language.
The code will give error. Please check the spelling and the brackets
+ 1
&& and || together are OK, but there are some syntactical mistakes.
result depends how you assign y
edit: now y=19 so result is true
+ 1
These are logical operators and they can be together in same expression. First we do operations in brackets: 19=-6 is false, then -6 < 19 true, then 19 < 8*4 true. Now expression looks like false || true && true which converts into false || true. The result is true. You can read about Java logical operators precedence to understand why.
0
Java