Which statement most accurately represents the relationship between searching and sorting with respect to the Arrays class?
binarySearch()
will be accurate, but slower than if it were sorted. binarySearch()
to get an accurate result. binarySearch()
to get an accurate result. C.
The binarySearch()
method requires a sorted array in order to return a correct result.
If the array is not sorted, the results of a binary search are undefined.