Two - Thread Program

Hi All,

I want to write a pgm using Threads given the problem scenario as:

I'm pretty new to Threads!

Write a NumberFactory class

- AddNumber and DisplayNumber are the threads running in the class

- AddNumber will add all ten numbers continuously

- DisplayNumber will display numbers in reverse order continuously

- The two threads should do the above in a synchronized fashin, ten times

Can anyone help me with this...? the approach etc

Thanks in advance,

Sanlearns

[538 byte] By [sanlearnsa] at [2007-11-27 10:06:17]
# 1
In absence of a detailed question or signs of effort on your part, here's all I can give you: http://java.sun.com/docs/books/tutorial/essential/concurrency/
jverda at 2007-7-13 0:42:28 > top of Java-index,Core,Core APIs...
# 2

Thread thread1 = new Thread(new ProblemDomainRunnable());

Thread thread2 = new Thread(new ProblemDomainRunnable());

thread1.start();

thread2.start();

jwentinga at 2007-7-13 0:42:28 > top of Java-index,Core,Core APIs...