| 15 | * ���ң��������ٶ���Ҳ��������ģ���Ϊ�����ı���������Ԫ��ԭʼ������λ�á� |
| 16 | */ |
| 17 | public class ArraysDemo { |
| 18 | public static void main(String[] args) { |
| 19 | int[] arr = { 24, 13, 69, 80, 57 }; |
| 20 | |
| 21 | // System.out.println(arr);// [I@a0834e7 |
| 22 | |
| 23 | // public static String toString(int[] a):������ת���ַ��� |
| 24 | System.out.println(Arrays.toString(arr)); // [24, 13, 69, 80, 57] |
| 25 | |
| 26 | // public static void sort(int[] a):����(��������) |
| 27 | Arrays.sort(arr); |
| 28 | System.out.println(Arrays.toString(arr)); // [13, 24, 57, 69, 80] |
| 29 | |
| 30 | // public static int binarySearch(int[] a,int key):���ֲ��� |
| 31 | // [13, 24, 57, 69, 80] |
| 32 | System.out.println(Arrays.binarySearch(arr, 24)); |
| 33 | System.out.println(Arrays.binarySearch(arr, 244)); // ??? -6 |
| 34 | } |
| 35 | } |
nothing calls this directly
no outgoing calls
no test coverage detected