-3
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?

vishvak
  • 31
  • 2
  • 5

1 Answers1

1

Obviously, if a > b is true, then b > a is not true, but b < a is true.

Maurice Perry
  • 9,261
  • 2
  • 12
  • 24