Reputation: 11
Program that demonstrates the use of multithread reading with the use of three counters with three threads defined for each. Thus threads should represent the counters as follows:
Upvotes: 0
Views: 632
Reputation: 533780
I suggest you create an ExecutorService and add three tasks to the service with one loop for each task. I could give you an answer, but unless you do some investigation yourself, you won't understand it.
Upvotes: 0
Reputation: 80194
The question is not clear but since this is a homework, I will just give hints
Upvotes: 2
Reputation: 156592
The Java Tutorial Concurrency Lesson is a great place to start learning about multithreading.
Upvotes: 2
Reputation: 17603
Even if you're very new to java, it should be easy to use google to get a idea how this problem can be solved, it's not very complicated.
Just have a look at this example about threading, it was the first hit. Check out the table of contents on javabeginner.com to learn more, I really recommend it to you.
Upvotes: 2