File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes merge sort Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "merge sort" Watch "merge sort" New topic

merge sort

Maha Hassan
Ranch Hand

Joined: Aug 02, 2005
Posts: 133
Dear All
I wonder how to implament merge sort using threads, i know that i will split the array till i have array of one element then start merging but i do not know how to write this in threads ..or how to ask the thread to return the sorted array..
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Start with the excellent Thread Tutorial from Sun to get the basics. You probably want something like:

Things to find in the tutorial ...

What does Thread.start() do?
What does Thread.join() do?
How do Runnable and Thread go together?

Does that answer the right question? Let us know how it goes!

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: merge sort
It's not a secret anymore!