Results 1 to 2 of 2

Thread: Help about Java Threads

  1. #1 Help about Java Threads 
    New Member
    Join Date
    Mar 2006
    Hi everybody..
    I wish U R OK!!
    I have a question about (Java Threads).
    My question is:

    Write two java methods. One is a compute intensive method (doing a lot of computations) and one is I/O intensive method (doing a lot of I/O). Measure the time for running both tasks as follows:
    Running both tasks in one thread.
    Running each of these tasks in a separate thread.
    Report both times.
    Which execution is faster. Explain your answer.

    I really need help in this question, so please don't disapointe me.

    Thanks alot

    Reply With Quote  


  3. #2  
    Forum Sophomore NimaRahnemoon's Avatar
    Join Date
    Oct 2005
    Sunnyvale, California
    I haven't done java in a while, but I am pretty sure that the one with the calculations is faster than the one that has to call the IO. Calculating is inherited, while you actually have to call classes to use the IO.

    Or else, that's what I think.

    Reply With Quote  

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts