Sorting arrays

Report a typo

The class Arrays provides a number of useful methods for processing arrays. Among them, there's a commonly used one called sort. It allows you to sort any array (string array, integer array, or even object array ). It accepts one argument: the array itself. It modifies the array, returning nothing.

In this task, you need to call this method from the Arrays class without using an import statement.

Sample Input 1:

y d b u t f m h x q

Sample Output 1:

b d f h m q t u x y
Write a program in Java 17
class ArraySorting {
/**
* @param array unordered sequence of strings
* @return ordered array of strings
*/
public static String[] sortArray(String[] array) {
// write your code here
}
}
___

Create a free account to access the full topic