difference between Java compare and compareTo methods
Does anybody know the differences between Java compare method (implements Comparator interface) and Java compareTo method (implements interface Comparable)?
The only obvious difference, which i have understood, is that that "compare" uses 2 arguments, while "compareTo" uses 1 argument.
|