Given:
public class Spock {
public static void main(String[] args) {
Long tail = 2000L;
Long distance = 1999L;
Long story = 1000L
You are using boolean exclusive OR and this is much the same as !=. In the first case, both conditions are true and in the second, both conditions are false so neither branch is taken. (You can check this with the debugger in your IDE)
The only real difference is that != has higher precedence than & which is higher than ^