import java.util.Arrays; public class Compare { public static void main(String[] args) { int[] a = {1,2,3,4,5}; int[] b = {1,2,3,4,5}; boolean are = Arrays.equals(a,b); System.out.println(are); Arrays.fill(a,10); System.out.println(Arrays.toString(a)); int[] arr3 = new int[]{34,54,3,2,65,7,34,5,76,34,67}; Arrays.sort(arr3); System.out.println(Arrays.toString(arr3)); int index = Arrays.binarySearch(arr3,15); if(index >= 0) { System.out.println("找到了"+index); } else { System.out.println("没找到"); } } }
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net