title: Java Arrays.binarySearch(Object[], int, int, Object) Signature Not Recognized
body: <p>I'm trying to use the binarySearch method documented at the <a href="http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html#binarySearch%28java.lang.Object%5B%5D,%20int,%20int,%20java.lang.Object%29" rel="nofollow noreferrer">Java API Specification</a> but my IDE, Eclipse (Helios), is not recognizing the signature. </p>
  
  <p>My class, boiled down to its 2 data members and the method in which I'm trying to call the Arrays.binarySearch:</p>
  
  <pre><code>import java.util.Arrays; // Access Arrays class
  public class SortedStringArrayList {
      // member data
      private String[] items;
      private int size;
  
      // methods
      public int testBinSearch(String item) {
          int index = Arrays.binarySearch(items, 0, size, item);
      }
  }
  </code></pre>
  
  <p>When I code in the method, Eclipse assumes I want a different signature and tells me:</p>
  
  <blockquote>
    <p>The method binarySearch(int[], int) in
    the type Arrays is not applicable for
    the arguments (String[], int, int,
    String)</p>
  </blockquote>
  
  <p>The signatures for binarySearch it suggested as available were:</p>
  
  <p><img src="https://i.stack.imgur.com/3QeQt.png" alt=""></p>
  
  <p>I'm very new to Java/Eclipse. Anyone know what the problem is?</p>