CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2008
    Posts
    1

    Exclamation 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.

  2. #2
    Join Date
    Apr 2007
    Posts
    442

    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.

  3. #3
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104

    Re: 10 threads magic problem.

    Quote Originally Posted by Londbrok
    What ever for?
    Homework...
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  4. #4
    Join Date
    Sep 2006
    Location
    Eastern, NC, USA
    Posts
    907

    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
  •  





Click Here to Expand Forum to Full Width

Featured