A is less than B
compareTo()
If you want to do A OP B
where
OP
is one of < <= == != >= >
do this:
A.compareTo( B ) OP 0
For example, you want A > B
but
>
can't be used directly. So do this:
A.compareTo( B ) > 0
If you want A < B
do this:
A.compareTo( B ) < 0
How would you test if A != B
?