import java.lang.reflect.Array;import java.nio.Buffer;import java.util.Arrays;import java.util.Random;//=================================================// File Name : Binary_Search//------------------------------------------------------------------------------// Author : Common//类名:BinarySearch_Find//属性://方法:class BinarySearch_Find{ private int[] temp; private int searchKey; private int lowerBound = 0; //下界 private int upperBound ; //上界 private int curNum; public int[] getTemp() { return temp; } public void setTemp(int[] temp) { this.temp = temp; } public BinarySearch_Find(int[] temp) {//构造函数 this.temp = temp; this.upperBound = temp.length-1; } public int find(int searchKey){ this.searchKey = searchKey; while(true){ curNum = (lowerBound+upperBound)/2; if(temp[curNum]==this.searchKey){ return curNum; //find } else if(lowerBound>upperBound){ return -1; //没有find } else{ if(temp[curNum]