I happen to come across many statements like comparable is used when natural ordering is required while sorting an array or collection and comparator for total ordering.
The version you may have heard could be same or different with the same meaning but ultimately its one of the distinguishing factors between the two(comparator and comparable interfaces).
But, I couldn't find a difference between the two types of ordering anywhere.
I'd appreciate if someone could explain it with a good example :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…