Basically, I have the same code in Eclipse, and everything works as it should, except the threads keep reading from the keyboard for a maximum of 1-2 lines even after displaying the results. However, here I get completely different results, despite the same input!