常用类-Arrays
Arrays
参考黑马程序员
Arrays类的概述和常用方法
Arrays类包含用于操作数组的各种方法
| 方法名 | 说明 |
|---|---|
| public static String toString(int[] a) | 返回指定数组的内容的字符串表示形式 |
| public static void sort(int[] a) | 按照数字顺序排列指定的数组 |
工具类的设计思想:
-
构造方法用private修饰
(防止外界使用创建对象) -
参考黑马程序员
Arrays类包含用于操作数组的各种方法
| 方法名 | 说明 |
|---|---|
| public static String toString(int[] a) | 返回指定数组的内容的字符串表示形式 |
| public static void sort(int[] a) | 按照数字顺序排列指定的数组 |
工具类的设计思想:
构造方法用private修饰(防止外界使用创建对象)