Click to See Complete Forum and Search --> : 10 threads magic problem.
arafat21
April 30th, 2008, 07:35 AM
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.
Londbrok
April 30th, 2008, 07:43 AM
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.
cjard
April 30th, 2008, 08:39 AM
What ever for?
Homework...
petes1234
April 30th, 2008, 12:03 PM
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!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.