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.
Printable View
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.
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.
Homework...Quote:
Originally Posted by Londbrok
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!