In which version of JDK7, MergeSort was replaced with TimSort in Collections.sort method?
问题 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