Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    Put it after any statement that changes the value of an array variable so you can see what value was assigned to that variable.
  2. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    What are you expecting?

    Next you need to verify that the sort is working as desired.
    To see if it is, add some println() statements that print out the contents of the arrays that are used to hold...
  3. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    If commenting out a statement is too hard, then this whole assignment will be too hard.

    The line number where the exception is thrown is shown in the error message:
  4. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    To comment out a statement:
    put // in column 1
    or
    wrap the statement: /* THE STATEMENT */
  5. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    Comment out the throws statement to keep it from throwing the exception.

    There are many types of sorts. Has your instructor told you which one to use and how its parts can be separated to run on...
  6. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    Improving an algorithm doesn't mean using threads.

    That exception is because the code chooses to throw it. The code must be rewritten so that exception is not thrown.
  7. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    Have you been able to compile and execute the current code and have it do a sort?
    What "improvement" do you expect by using threads? Does the "improvement" depend on the type of computer the code...
  8. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    The above exception comes from the following statement in the code:


    throw new java.lang.IllegalStateException("Method not implemented");

    Ask the author of that code why that statement is...
  9. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    Start by copying a working example from the tutorial.
    Make a simple change to the code, compile and execute it. If there are problems, copy the code and the full text of the error messages and...
  10. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    Java Platform SE 7

    And the tutorial:
    http://docs.oracle.com/javase/tutorial/essential/concurrency/threads.html
  11. Re: Need Help with Sorting using thread sorting, How do I use a thread?

    Please edit your post and wrap your code with code tags:


    YOUR CODE HERE

    to get highlighting and preserve formatting.

    A sort would be done the same way in a thread the code explicitly...
Results 1 to 11 of 11