---restore content starts---
The Arrays class is a tool class provided in Java, in the Java.util package. The class contains methods for manipulating arrays directly, such as sorting, searching, and so on (for classes and methods), which are explained in detail in a later section.
Common methods in Arrays:
Sort
Syntax: Arrays.sort (array name);
You can use the sort () method to sort the array by placing the array name in the parentheses of the sort () method, which you can sort by in ascending order
Convert an array to a string
Syntax: arrays.tostring (array name);
You can use the ToString () method to convert an array into a string that joins multiple array elements sequentially, separated by commas and spaces between multiple elements
using the foreach action array
foreach is not a keyword in Java, it is a special simplified version of A for statement, which is simpler and easier to iterate through arrays and collections. To understand the meaning of foreach as "for each" from the literal meaning of English.
Grammar:
for (element type element variable: Traverse object)
Using the Arrays class to manipulate arrays in Java