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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.