binarySearch method issue, not accepting int parameter
<p>I am using the Java 2 Platform to practice different algorithms.  I am getting two errors and I think the first one is that I am passing the integer "5" from <code>arrayList[]</code> and getting an error.  The second problem is that I am getting an error in the main method when I call <code>binarySearch();</code>.  Do I need to put arrayList as the parameter for <code>binarySearch(arrayList)</code>?  Any help would be appreciated. </p>

<pre><code>import java.util.ArrayList;

public class BinarySearch {

 int arrayList[]={1,2,3,4,5,6,7,8,9};

 public static int binarySearch(int[] arrayList[],int 5)
 {
  int low = 0;
  int high = arrayList.length - 1;
  int mid = 0;

  while(low&lt;=high)
  {
   mid = (low+high)/2;
   if(arrayList[mid].compareTo(searchObj)&lt;0)
    low = mid + 1;
   else if (arrayList[mid].compareTo(searchObj)&gt;0)
   {
    high = mid -1;
   }
   else 
    return mid;
  }
  return -1;

 }
 public static void main(String args[])
 {
  binarySearch();

 }

}
</code></pre>
