When using Collection.sort in Java what should I return when one of the inner objects is null
Example:
Collections.sort(list, new Comparator
It depends, do you consider null as a big value or a low value.
You can consider most of the time that null < everything else, but it depends on the context.
And 0 would be a terrible return value here.