Learning compareTo(Object o) method of Comparable