comp(a,b)
Returns -1 if object a
is smaller than b
. Returns 1 if object a
is bigger than b
. Returns 0 otherwise.
If compared objects are strings, it uses the lexicographical order implemented by the java language.
Example
comp(4,99)
-1
comp(100, 23)
1
comp("a", "z")
-1