/*
* java.util.Arrays 是与数组相关的工具类
* */
public class Test3 {
public static void main(String[] args) {
/*1
* toString(数组) 将数组转换成字符串 [元素1,元素2,元素3]
* */
String [] a = {"a","b","cc","ddd"};
String string2 = Arrays.toString(a);
System.out.println(string2);
/*2
* sort(数组) 按照默认升序对数组的元素排序
* */
int[] array={2,0,5,2,5,1,0,3,0,1,02,01};
Arrays.sort(array);
for (int i : array) {
System.out.print(i+" ");
}
}
}