The question is published on by Tutorial Guruji team.
Have a task on my education in Java: Make a condition, which is true if only one of X and Z values is less than 20. The way how to do that is like:
(X < 20 && Y >= 20) || (X >= 20 && Y < 20)
(a < 20) != (b < 20)
But I have restrictions, it should be solved using no more than 2 comparison operators, no * / + – operators, no bitwise operators
return Math.max(a, b) >= 20 && Math.min(a, b) < 20;