0

Does anyone know where I can find the actual implementation of binarySearch in java.util.Collections? Specifically the following:

binarySearch(List<? extends T> list, T object, Comparator<? super T> comparator) 
2
  • You can usually search for the file source on grepcode.com Commented Dec 4, 2013 at 21:06
  • If you use eclipse, just put the cursor at a call to the method, and press F3. Commented Dec 4, 2013 at 21:45

1 Answer 1

2

Each JDK installation comes with a src.zip file containing the public source code. The .java file for java.util.Collections is part of that.

Alternatively, you can see source at grepcode.com by doing a simple search for java.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.