Overview
java.util.Arrays
This class contains various methods for manipulating arrays, such as sorting and search etc. All its methods are static methods and are very simple to call.
Methods for operating arrays
public static String toString(int[] a)
: Returns the string representation of the specified array content.
Free online video teaching: java video tutorial
Example:
public static void sort (int[] a)
: Sort the specified int array in ascending numerical order.
Example:
Exercise
Please use the relevant API to convert a All characters in a random string are arranged in ascending order and printed in reverse order.
Example:
More related articles and tutorials are recommended:java entry program
The above is the detailed content of Commonly used classes in java——Arrays. For more information, please follow other related articles on the PHP Chinese website!