Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 596985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:13:52+00:00 2026-05-13T16:13:52+00:00

https://docs.oracle.com/javase/1.5.0/docs/api/java/util/Arrays.html Sun does not mention any complexity for their binary-search implemention. Is this a

  • 0

https://docs.oracle.com/javase/1.5.0/docs/api/java/util/Arrays.html

Sun does not mention any complexity for their binary-search implemention. Is this a mistake? I know it should be O(logn), but it makes me nervous when they don’t state this explicitly. They do for some of their algoritms, like Arrays.sort.

Does any of you have any knowledge of the actual implementation? I have not had the opportunity to download the source code yet myself! I guess its a trivial binary search, but Sun do sometimes tweak the algoritms for better performance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:13:52+00:00Added an answer on May 13, 2026 at 4:13 pm

    The implementation of java.util.Array is straightforward and there is no room for optimizations.

    You find the source code in JAVA_HOME/src.zip.
    The sorting alogrithm in this class, which is required in order to use binary search, is a optimized quicksort wich offers n*log(n) performance (on many data sets).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

https://docs.oracle.com/javase/6/docs/api/java/lang/System.html#currentTimeMillis() says: Returns the current time in milliseconds. Note that while the unit of
I was reading the JavaDoc for Threadlocal here https://docs.oracle.com/javase/1.5.0/docs/api/java/lang/ThreadLocal.html and it says ThreadLocal instances
According to doc, calendar set() is: http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Calendar.html#set%28int,%20int,%20int%29 set(int year, int month, int date) Sets
The link http://download.oracle.com/javase/6/docs/api/java/util/concurrent/package-summary.html describes several interesting data structures like concurrent skip-list. Is there any
According to http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Class.html#getDeclaredMethods%28%29 , Class.getDeclaredMethods() should only include methods declared by the class. However,
I'm currently looking at the EventQueue class on the Oracle website: http://download.oracle.com/javase/1.4.2/docs/api/java/awt/EventQueue.html But I'm
http://download.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/XmlSeeAlso.html According to this, I should be able to make my root element have
Hopefully an easy question. From the example on http://download.oracle.com/docs/cd/E17409_01/javase/tutorial/uiswing/components/combobox.html on Providing a Custom Renderer
At http://docs.jquery.com/UI/Tabs#Example there is a short HTML example of how to use JQuery UI
I know there is a Jackpot API http://jackpot.netbeans.org/docs/org-netbeans-modules-jackpot/overview-summary.html for programmatic access the the rules

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.