This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
They are just interfaces, which allows to determine the natural order of the compared objects. The comparing algorithm is in the class doing the actual comparision. For example, java.util.Collections.sort(). The API says : The sorting algorithm is a modified mergesort (in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist). This algorithm offers guaranteed n log(n) performance. This implementation dumps the specified list into an array, sorts the array, and iterates over the list resetting each element from the corresponding position in the array. This avoids the n2log(n) performance that would result from attempting to sort a linked list in place.
Well Chrishtope, but merge sort needs two list[or array] , then it will sort and merge those two into one list. but here i have only one list which has the objects need to be sort. in this case you mean Collections class (sort()) use the merge sort?