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()

Recommended Answers

You should have very little code at all in main() - the majority of it should be in separate classes and methods.

Jump to Post

All 3 Replies

You should have very little code at all in main() - the majority of it should be in separate classes and methods.

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.

neilcoffey thank you, i have same thougth, will answer by results

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.