![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e360. Finding an Element in a Sorted ArrayThis example also works if the object is a primitive type.int index = Arrays.binarySearch(sortedArray, object); if (index < 0) { // not found }
e359. Sorting an Array e361. Finding an Element in a Sorted List e362. Inserting an Element into a Sorted List
© 2002 Addison-Wesley. |