📅  最后修改于: 2022-03-11 14:52:35.799000             🧑  作者: Mango
//for big data we can use multiple threads for faster sorting
int[] arr={1,2,3,4,5,2,4};
//using parallelsort()
Arrays.parallelSort(arr);
//using stream
int[] arr=Arrays.stream(arr)
.parallel()
.sorted()
.toArray();