Java comparable and comparator example to sort objects.