如题java.util.Arrays.sort(int[] a)数组形参传递为啥能修改原始数组的内容?[public static void sort(int[] a)](http://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html#sort(int[]))Sorts the specified array into ascending numerical order.Implementation note: The sorting algorithm is a Dual-Pivot Quicksort by Vladimir Yaroslavskiy, Jon Bentley, and Joshua Bloch. This algorithm offers O(n log(n)) performance on many data sets that cause other quicksorts to degrade to quadratic performance, and is typically faster than traditional (one-pivot) Quicksort implementations.Parameters:a - the array to be sorted
添加回答
举报
0/150
提交
取消