posted 7 years ago
I dont know how to explain my question. But let me try.
I tried out 2 programs. One is Waiter/Notifier and other is Producer/Consumer.
In the waiter/Notifier program the logic is written in the class which implements Runnable. i.e. Waiter and Notifier class(in Code 1)
In the producer/consumer example the logic is written in the class which does not implement Runnable ie CubbyHole(in Code 2). Now my question how do I remember where to write the logic. Can someone please help me
I know it is a weird question but still
Code 1:
Code 2: