问题
I searched and couldn't find in which version the TimSort actually replaced the MergeSort in collections.sort() method. If anyone can let me know the exact version for JDK7 it would be a great help.
回答1:
TimSort has been used in Java 7 right from the release. To be more specific, it has been added in Java 7, beta 70.
It might be worth noting that this is still a modified merge sort, just having more modifications being more efficient than the modified merge sort that has been used in previous version.
来源:https://stackoverflow.com/questions/47084824/in-which-version-of-jdk7-mergesort-was-replaced-with-timsort-in-collections-sor