|
-
April 30th, 2008, 07:35 AM
#1
10 threads magic problem.
May be this is easy but I unable to short out...help me.
Write a java program to count 1 to 1000 numbers using 10 threads.
So...need your help mate.
-
April 30th, 2008, 07:43 AM
#2
Re: 10 threads magic problem.
Count one to thousand numbers using ten threads? What ever for? Do each count individually to thousand, or each count a portion of it...? logic of this ecapes me.
Anyhow. You could use Executor, and fixedThreadPool. Then execute the 10 Runnables and that would be it. If you explain what you actually are doing, I could explain in more elaborate detail. Else google on those.
-
April 30th, 2008, 08:39 AM
#3
Re: 10 threads magic problem.
 Originally Posted by Londbrok
What ever for?
Homework...
-
April 30th, 2008, 12:03 PM
#4
Re: 10 threads magic problem.
Yasir: ask a specific question, show that you've already done lots of work on this, that you have put in the effort and are willing to put in more, and you'll get lots of help. Simply post your assignment and often you get pointless posts like this one. much luck!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|