comparable and comparator

a comparable object can use Array.sort() to sort