I meant other ways of synchronization, there is more then one.
Maybe google "consumer producer synchronization" and read up on some documentations and articles describing what it is.
Type: Posts; User: Cornix
I meant other ways of synchronization, there is more then one.
Maybe google "consumer producer synchronization" and read up on some documentations and articles describing what it is.
What methods for synchronization do you know and which do you want to use?
First of all you should create 2 threads, either pass a runnable to either of them or use annonymous sub-classes of thread that overwrite their run() method.
Have them print numbers inside a for...