Search:

Type: Posts; User: mynorka

Search: Search took 0.08 seconds.

  1. Replies
    12
    Views
    1,178

    Re: Thread Queueing

    Here's the full text

    Exception in thread "t1" java.lang.IllegalMonitorStateException
    at java.lang.Object.notify(Native Method)
    at csu.mcdonald.Library.returnBook(Library.java:34)
    at...
  2. Replies
    12
    Views
    1,178

    Re: Thread Queueing

    I've modified the Library class to include two methods for retrieving and returning books, however, I keep getting a IllegalMonitorStateException whenever I try and run the program


    public class...
  3. Replies
    12
    Views
    1,178

    Re: Thread Queueing

    Could I pass an instance of Library to the PatronThread constructor? And if I do that, wouldn't it still create a separate instance of Library for each Thread?
    For example:


    public...
  4. Replies
    12
    Views
    1,178

    Re: Thread Queueing

    Here's the rest of the code

    Library Class


    package csu.mcdonald;

    import java.util.LinkedList;

    public class Library {
  5. Replies
    12
    Views
    1,178

    Thread Queueing

    Hello all!

    I'm writing a simple program that consists of 10 threads and a library of 5 books. Each thread checks to see if the library has any books to check out, and enters a FIFO queue if the...
  6. Passing An Object To The Constructor Of Another Object

    Hello all! This is my first post in this forum, and it's about objects.

    I have two separate classes, Point and PlaneCircle. The Point class has two fields, x and y, which are used to construct a...
Results 1 to 6 of 6