University of Texas at El Paso
Banner
Compuer Science
   
RunBinarySearch.java Minimize    

public class RunBinarySearch {
  public static void main(String[] args) {
    int[] testList = {2,4,7,10,11,45,50,59,60,66,69,70,79};
    int element = 11;
    int result = BinarySearch.binarySearch(testList,element);
    System.out.println("element "+element+" is at position "+result);   
  }
}