int value = b.compareTo(a);
int value = a.compareTo(b);
why does I get two different values for each of them? Aren't they the same? How does it work, can anyone explain?
int value = b.compareTo(a);
int value = a.compareTo(b);
why does I get two different values for each of them? Aren't they the same? How does it work, can anyone explain?
Obviously, if a > b
is true, then b > a
is not true, but b < a
is true.