Skip to main content

Thread

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
umesh_rama
Offline
Joined: 2008-11-21

Hi

I Have two threads, first thread will print only the odd numbers
like {1,3,5,7,.....} & a second thread will print only even numbers like {2,4,6,....}

I want print the output like {1,2,3,4,5,6,7,.............}

How to implement this kind of scenario using thread. please suggest me.

thanks