how to sort array in ascending order code example
Example: sorting array in ascending order java
import java.util.Arrays;
public class JavaArraySortMethod
{
public static void main(String[] args)
{
String[] strGiven = {"Great Barrier Reef", "Paris", "borabora","tokyo", "Cusco"};
Arrays.sort(strGiven);
System.out.println("Output(case sensitive) : " + Arrays.toString(strGiven));
}
}