I'm trying to use the binarySearch method documented at the Java API Specification but my IDE, Eclipse (Helios), is not recognizing the signature.
My class, boiled down to its 2 data members and the method in which I'm trying to call the Arrays.binarySearch:
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);
}
}
When I code in the method, Eclipse assumes I want a different signature and tells me:
The method binarySearch(int[], int) in the type Arrays is not applicable for the arguments (String[], int, int, String)
The signatures for binarySearch it suggested as available were:

I'm very new to Java/Eclipse. Anyone know what the problem is?