About 353,000 results
Open links in new tab
  1. Arrays.sort() in Java - GeeksforGeeks

    Apr 8, 2025 · The Arrays.sort() method is used for sorting the elements in an Array. It has two main variations: Sorting the entire array (it may be an integer or character array) Sorting a …

  2. Sort an array in Java - Stack Overflow

    Aug 1, 2017 · just FYI, you can now use Java 8 new API for sorting any type of array using parallelSort. parallelSort uses Fork/Join framework introduced in Java 7 to assign the sorting …

  3. Java Arrays. sort() Method - W3Schools

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

  4. How to Sort an Array, List, Map or Stream in Java - HowToDoInJava

    Lists (and arrays) of objects that implement Comparable interface can be sorted automatically by Collections.sort () and Arrays.sort () APIs. Objects that implement this interface will be …

  5. Sort array of integers in Java (or any other primitive type)

    Oct 10, 2023 · This article will discuss various methods to sort a primitive integer array (or any other primitive type) in Java. 1. Sort integer array using Arrays.sort() method. Arrays class …

  6. Sorting in Java - Baeldung

    Jan 5, 2024 · This article will illustrate how to apply sorting to Array, List, Set and Map in Java 7 and Java 8. 2. Sorting With Array. Let’s start by sorting integer arrays first using Arrays.sort () …

  7. How to Sort an Array in Java - Tpoint Tech

    May 14, 2025 · Let's sort an array using the sort () method of the Arrays class. In the following program, we have defined an array of type integer. After that, we have invoked the sort () …

  8. How to Sort an Array in Java 8 - Java Guides

    In Java 8, you can sort arrays using the Arrays.sort() method for basic sorting in ascending order, or you can use Streams for more flexibility, including sorting in descending order. Both …

  9. Sorting in Java - GeeksforGeeks

    Mar 15, 2024 · In Java, sorting an array consists of arranging the elements in a particular order, such as ascending or descending. This can be achieved using various algorithms like Bubble …

  10. java - Sorting int array in descending order - Stack Overflow

    Just traverse the array in a descending order after sort. For primitive array types, you would have to write a reverse sort algorithm: Alternatively, you can convert your int[] to Integer[] and write …

  11. Some results have been removed
Refresh