I got asked this question recently in an interview.

Write a program with two threads (A and B), where A prints 1 , B prints 2 and so on until 50 is reached.

How do we go about doing that ?

Edit
Report