I guess the output is correct. First already the main thread is started and then we start the thread A, till it takes its turn
Begin will be printed and then a will take the turn and RUN will be printed. Then we say
Main joins a thread and then END is printed and the thread completes. Output is
Rest i am still a bit confused, let others comment.
I agree with you that "RunBeginEnd" is a possible output.
After the "a" thread is started, it can be selected to
run right away, and so it could start executing the
run() method before the main thread prints "Begin."
I agree with you again that "BeginRunEnd" is also a
In a way, the question is tricky because "RunBeginEnd"
is not listed as a possible result.
Joined: Oct 13, 2009
Yes nick is correct. I just ran in debug mode and i got the answer as
I guess the question should be amended as, pick up all the correct answers and these two choices should be