1.关于Arrays
记得binarySearch方法返回的int 类型的数值的含义。
If the array contains multiple elements with the specified value, there is no guarantee which one will be found.
而且当查找数小于数组中任何一个数时返回-1 ,当查找数大于数组中任何一个数时返回 -(array.length+1)
System.out.println(Arrays **)
如果参数类型是char[],那么输出是由数组元素组成的字符串,如果是其他类型的数组,则是随机字符串。
记得binarySearch方法返回的int 类型的数值的含义。
If the array contains multiple elements with the specified value, there is no guarantee which one will be found.
而且当查找数小于数组中任何一个数时返回-1 ,当查找数大于数组中任何一个数时返回 -(array.length+1)
System.out.println(Arrays **)
如果参数类型是char[],那么输出是由数组元素组成的字符串,如果是其他类型的数组,则是随机字符串。