About 2,840,000 results
Open links in new tab
  1. Java Arrays sort () Method - W3Schools

    Definition and Usage The sort() method sorts an array in ascending order. This method sorts arrays of strings alphabetically, and arrays of integers numerically.

  2. Arrays (Java Platform SE 8 ) - Oracle Help Center

    This class contains various methods for manipulating arrays (such as sorting and searching). This class also contains a static factory that allows arrays to be viewed as lists. The methods in this class all …

  3. Sorting in Java - GeeksforGeeks

    Jan 19, 2026 · Which sorting algorithm does Java use in sort ()? Previously, Java's Arrays.sort method used Quicksort for arrays of primitives and Merge sort for arrays of objects.

  4. Arrays (Java Platform SE 8 ) - Oracle

    たとえば、sort(Object[])が使用するアルゴリズムはマージ・ソートである必要はありませんが、固定 (stable)のアルゴリズムでなければいけません。 このクラスは、 Java Collections Framework のメ …

  5. How to Sort an Array in Java - CodeGym

    Dec 27, 2024 · In this program, first, we import the java.util.Arrays class to gain access to the Array.sort method. Then we create a string array called instruments containing the musical instrument names. …

  6. Java Arrays sort (int [] a) Method - Online Tutorials Library

    The Java Arrays sort(int[] a) method sorts the specified array of ints into ascending numerical order. This method using a Dual-Pivot Quicksort algorithm which breaks the array into subarrays, sorted them …

  7. Java Sort Arrays Examples (with Comparable and Comparator)

    Apr 14, 2021 · You know, the java.util.Arrays class provides various methods for sorting elements of an array, as simple as: Arrays.sort (array) This tutorial shows various examples of sorting an array using …

  8. Sorting Arrays in Java - Baeldung

    Jan 8, 2024 · Java’s util.Arrays.sort method provides us with a quick and simple way to sort an array of primitives or objects that implement the Comparable interface in ascending order. When sorting …

  9. How To Sort An Array In Java – Tutorial With Examples

    Apr 1, 2025 · This Tutorial will Explain Various Methods to Sort An Array in Java in Ascending, Descending & Alphabetical Order with the help of Simple Code Examples.

  10. Sort an Array in Java using Comparator - GeeksforGeeks

    Jul 23, 2025 · To sort an array using the comparator first we convert the array into the list, call the sort method on the list and pass an instance of the comparator as an argument. Below are the …