Algorithms behind the java util package

Dear Experts,

As every java developers knows, there are very frequently used and much handy functionalities provided in java.util package, like search, sort, timer .. etc. I hope these functionalities are built from the principle of certain high performing algorithms to achieve better performance, reliability, durability.  Can anyone please let me know the concepts/algorithms/principles being considered to develop these functionalities?
Gangadhara MelukoteAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

phoffricCommented:
I haven't looked under the hood for these Java Utilities. Some of them, such as sort, search are developed using principles in this course:
  http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/

Video lectures are here:
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/lecture-videos/
0
dpearsonCommented:
Can anyone please let me know the concepts/algorithms/principles being considered to develop these functionalities?

That's something of a massive question - you do understand there are hundreds of algorithms in java.utils.

Probably the largest collection of algorithms is the collections API.  That was largely designed by Josh Bloch.  He subsequently wrote Effective Java (http://www.amazon.co.uk/Effective-Java-Edition-Joshua-Bloch/dp/0321356683) so you could read that to get an insight into his thinking about good software design principles etc.

That being said, the Java collections API was written more than a decade ago and algorithms have of course progressed significantly since then.  So generally they're "good" but not "the best possible".
Specifically the APIs have problems (quite a lot of interface methods end up being not-implemented, immutable vs mutable data types are basically unsupported etc.).

Google has written a set of enhanced libraries (Guava https://code.google.com/p/guava-libraries/) which help to fill in and improve on those in java.utils.  Sun (Oracle) also added on the concurrency package and generics in later releases which improved on the basic set of algorithms and classes.

Of course all of the code is also open source - so if you're wondering about how exactly hash map implements its hash function - you can just look at the code :)

Hope that helps,

Doug
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
phoffricCommented:
To help you better understand the Java algorithm code, I recommend that you sign up for this free Coursera course, Algorithms, Part I by Kevin Wayne, Robert Sedgewick

From what I have seen so far in this course, the presentation style starts off a bit easier, and more specific to Java, than the MIT course in my first post. My Coursera email also included this:
If you haven't programmed in Java recently, you might wish to prepare for the course by writing some code, perhaps with the help of our Introduction to Programming in Java textbook and associated free booksite.
I took a look at their booksite. If you know some Java, then this site should be good enough to supplement the Coursera Algorithms course. Part II is also available with Coursera.
1
krakatoaCommented:
Can anyone please let me know the concepts/algorithms/principles being considered to develop these functionalities?

Are you intending to deliver us some improvements?
0
Gangadhara MelukoteAuthor Commented:
Thanks all for your valuable information. Your answers are leading me in right directions to refresh on core concepts!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.