The array.sort method in Java 6 makes use of quicksort for arrays of primitives and mergesort for arrays of object. From my perspective, quicksort is faster than mergesort, It also uses less memory and time complexity for both are O(n log(n)). So why is it that both methods are being used for different types?