I have this expression:
y[i] = ( z[i] == a && b || c )
Which of these elements (&&, ||, ==) have the priority?
&&
||
==
Can you please show the order of operations with brackets?
First ==, then &&, then ||.
Your expression will be evaluated as y[i] = (((z[i] == a) && b) || c).
y[i] = (((z[i] == a) && b) || c)
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
1.4m articles
1.4m replys
5 comments
56.9k users