943,980 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 562
  • Java RSS
Jan 22nd, 2009
0

Sorting with thread

Expand Post »
hey can any one help me in writing the code :
Write a Java program that sorts given integers using threads

I am not able to proceed ..What should i have in main function()
Similar Threads
Reputation Points: 7
Solved Threads: 0
Newbie Poster
soniagupta98 is offline Offline
5 posts
since Nov 2008
Jan 22nd, 2009
0

Re: Sorting with thread

You should have very little code at all in main() - the majority of it should be in separate classes and methods.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 839
Posting Genius
Ezzaral is offline Offline
6,761 posts
since May 2007
Jan 23rd, 2009
0

Re: Sorting with thread

I assume that "by threads", the assignment means sorting with several threads in parallel. So you need to:
- know how to program with threads in Java
- pick an algorithm that can be parallelised. This essentially means one that uses a "divide and conquer" strategy to work on different parts of the list and then amalgamate the results. Take a look at the Quicksort algorithm, for example.
Reputation Points: 120
Solved Threads: 7
Junior Poster in Training
neilcoffey is offline Offline
53 posts
since Dec 2008
Aug 9th, 2011
0
Re: Sorting with thread
neilcoffey thank you, i have same thougth, will answer by results
Reputation Points: 10
Solved Threads: 0
Newbie Poster
finfort is offline Offline
1 posts
since Aug 2011

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Parking System
Next Thread in Java Forum Timeline: Java problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC